HelloDBA [中文]
Search Internet Search HelloDBA
  Oracle Technology Site. email: fuyuncat@gmail.com  MSN: fuyuncat@hotmail.com Add to circle  acoug  acoug 

FyDul: Last chance for saving your oracle data

[中文]

Author:  fuyuncat

Source:  www.HelloDBA.com

Date:  2016-04-24 06:28:01

Share to  Twitter Facebook GMail Blogger Orkut Google Bookmarks Sina Weibo QQ Renren Tieba Kaixin Douban Taobao

What if your oracle crashed and can not be recovered? FyDul (AKA FySafe) is the last chance for you to save your data. It's is small program to read the data from data files directly. 

I wrote this program in 2006, and now I improved it to make it easier be used. In most scenarios, you just need to issue below 3 commands.

s df <data files>

pp

dt <data file id>

Note: This tool is NOT for business purpose, I wrote it just for fun :P

Example:

 

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;  

Download

--- Fuyuncat ---

Top

Copyright ©2005, HelloDBA.Com All reseverd.

Declaration
by fuyuncat