HelloDBA [English]
搜索Internet 搜索 HelloDBABA
  Oracle技术站。email: fuyuncat@gmail.com  MSN: fuyuncat@hotmail.com   acoug  acoug 

FyDul: 拯救你的数据的最后机会

[English]

作者: fuyuncat

来源: www.HelloDBA.com

日期: 2016-04-24 06:28:01

分享到  新浪微博 腾讯微博 人人网 i贴吧 开心网 豆瓣 淘宝 推特 Facebook GMail Blogger Orkut Google Bookmarks

 如果你的Oracle数据库崩溃了,且无法通过正常途径恢复,那么FyDul也许是你拯救数据的最后机会了.FyDul(即FySafe)是我在2006年写的小程序,现在我将它进一步简化,使之使用起来更加简单.

大多数情形下,只需要以下3个命令便可以恢复数据:

s df <data files>

pp

dt <data file id>

注意:本程序非商业用途程序,仅仅是作者业余之作.

示例:

SQL代码
  1. oracle@syddbd1::> java -jar FYDul.jar  
  2.   
  3. FYDul: Release v1.0.1  
  4.   
  5. Copyright (c) 2006, 2013, Fuyuncat, www.HelloDBA.com. All rights reserved.  
  6. Trail Version, limited to recover 1000 rows only.  
  7.   
  8. FYDul CMD>s df /u01/app/oracle/oradata/dbat1/system01.dbf /u01/app/oracle/oradata/dbat1/example01.dbf  
  9.   
  10. ok7!  
  11.   
  12. FYDul CMD>pp  
  13. ... ...  
  14. ....*  
  15. ....*  
  16. .*  
  17. .*  
  18. .*  
  19. .*  
  20.   
  21. INFO: End analyze file /u01/app/oracle/oradata/dbat1/example01.dbf at: 2014-04-24 01:37:00: 1919 tables detected!  
  22. .................................................................................................*(Rows:92989)  
  23. Got atrributes!  
  24.   
  25. FYDul CMD>ls  
  26.   
  27. File 1 is located at:/u01/app/oracle/oradata/dbat1/system01.dbf  
  28. File 5 is located at:/u01/app/oracle/oradata/dbat1/example01.dbf  
  29.   
  30. FYDul CMD>df 5  
  31. ... ...  
  32. Dul table SH.DIMENSION_EXCEPTIONS  
  33. ........*(Rows:0)  
  34. Dul table SH.CAL_MONTH_SALES_MV  
  35. ........*(Rows:48)  
  36. Dul table SH.FWEEK_PSCAT_SALES_MV  
  37. ........................................................................*(Rows:11266)  
  38. Dul table T_76064.0  
  39. ........*(Rows:0)  
  40. Dul table T_76065.0  
  41. ........*(Rows:0)  
  42. Dul table T_76066.0  
  43. ........*(Rows:0)  
  44. Dul table T_76067.0  
  45. ........*(Rows:0)  
  46. FYDul CMD>show  
  47.   
  48. INFO: There are 5525 tables with data found in 2 files; The output folder is /tmp/dul/output/; Output file format is sql; Log file is located at /tmp/dul20140424_161544.log.  
  49.   
  50.   
  51. ok26!  
  52.   
  53. FYDul CMD>exit  
  54.   
  55. Good bye!  
  56. oracle@syddbd1::> ls /tmp/dul/output/SH/  
  57. create_tb_CAL_MONTH_SALES_MV.sql    create_tb_PROMOTIONS.sql                  insert_DR$SUP_TEXT_IDX$R.sql  
  58. create_tb_CHANNELS.sql              create_tb_SUPPLEMENTARY_DEMOGRAPHICS.sql  insert_FWEEK_PSCAT_SALES_MV.sql  
  59. create_tb_COUNTRIES.sql             create_tb_TIMES.sql                       insert_PRODUCTS.sql  
  60. create_tb_CUSTOMERS.sql             insert_CAL_MONTH_SALES_MV.sql             insert_PROMOTIONS.sql  
  61. create_tb_DIMENSION_EXCEPTIONS.sql  insert_CHANNELS.sql                       insert_SUPPLEMENTARY_DEMOGRAPHICS.sql  
  62. create_tb_DR$SUP_TEXT_IDX$I.sql     insert_COUNTRIES.sql                      insert_TIMES.sql  
  63. create_tb_DR$SUP_TEXT_IDX$R.sql     insert_CUSTOMERS.sql                      lob  
  64. create_tb_FWEEK_PSCAT_SALES_MV.sql  insert_DIMENSION_EXCEPTIONS.sql  
  65. create_tb_PRODUCTS.sql              insert_DR$SUP_TEXT_IDX$I.sql  
  66.   
  67. oracle@syddbd1::> tail -3 /tmp/dul/output/SH/insert_CUSTOMERS.sql  
  68. insert into "CUSTOMERS"(CUST_ID, CUST_FIRST_NAME, CUST_LAST_NAME, CUST_GENDER, CUST_YEAR_OF_BIRTH, CUST_MARITAL_STATUS, CUST_STREET_ADDRESS, CUST_POSTAL_CODE, CUST_CITY, CUST_CITY_ID, CUST_STATE_PROVINCE, CUST_STATE_PROVINCE_ID, COUNTRY_ID, CUST_MAIN_PHONE_NUMBER, CUST_INCOME_LEVEL, CUST_CREDIT_LIMIT, CUST_EMAIL, CUST_TOTAL, CUST_TOTAL_ID, CUST_SRC_ID, CUST_EFF_FROM, CUST_EFF_TO, CUST_VALID) values(100680,'Joshua','Prabu','M',1954,'Mabsent','67 North Evans Avenue','59918','Cleveland',051330,'WI',052760,052790,'379-481-4535','L: 300,000 and above',011000,'Prabu@company.com','Customer total',052772,NULL,to_date('1998-1-1 0:0:0''yyyy-mm-dd hh24:mi:ss'),NULL,'A');  
  69. insert into "CUSTOMERS"(CUST_ID, CUST_FIRST_NAME, CUST_LAST_NAME, CUST_GENDER, CUST_YEAR_OF_BIRTH, CUST_MARITAL_STATUS, CUST_STREET_ADDRESS, CUST_POSTAL_CODE, CUST_CITY, CUST_CITY_ID, CUST_STATE_PROVINCE, CUST_STATE_PROVINCE_ID, COUNTRY_ID, CUST_MAIN_PHONE_NUMBER, CUST_INCOME_LEVEL, CUST_CREDIT_LIMIT, CUST_EMAIL, CUST_TOTAL, CUST_TOTAL_ID, CUST_SRC_ID, CUST_EFF_FROM, CUST_EFF_TO, CUST_VALID) values(100055,'Andrew','Clark','F',1978,'Married','77 Cumberland Avenue','74673','Duncan',051402,'SC',052722,052790,'260-755-4130','J: 190,000 - 249,999',011000,'Clark@company.com','Customer total',052772,NULL,to_date('1998-1-1 0:0:0''yyyy-mm-dd hh24:mi:ss'),NULL,'A');  
  70. commit;  

点击下载

--- Fuyuncat ---

Top

Copyright ©2005,HelloDBA.Com 保留一切权利

申明
by fuyuncat