[English]
作者:
fuyuncat
来源:
www.HelloDBA.com
如果你的Oracle数据库崩溃了,且无法通过正常途径恢复,那么FyDul也许是你拯救数据的最后机会了.FyDul(即FySafe)是我在2006年写的小程序,现在我将它进一步简化,使之使用起来更加简单.
大多数情形下,只需要以下3个命令便可以恢复数据:
s df <data files>
pp
dt <data file id>
注意:本程序非商业用途程序,仅仅是作者业余之作.
示例:
SQL代码
- oracle@syddbd1::> java -jar FYDul.jar
- FYDul: Release v1.0.1
- Copyright (c) 2006, 2013, Fuyuncat, www.HelloDBA.com. All rights reserved.
- Trail Version, limited to recover 1000 rows only.
- FYDul CMD>s df /u01/app/oracle/oradata/dbat1/system01.dbf /u01/app/oracle/oradata/dbat1/example01.dbf
- ok7!
- FYDul CMD>pp
- ... ...
- ....*
- ....*
- .*
- .*
- .*
- .*
- INFO: End analyze file /u01/app/oracle/oradata/dbat1/example01.dbf at: 2014-04-24 01:37:00: 1919 tables detected!
- .................................................................................................*(Rows:92989)
- Got atrributes!
- FYDul CMD>ls
- File 1 is located at:/u01/app/oracle/oradata/dbat1/system01.dbf
- File 5 is located at:/u01/app/oracle/oradata/dbat1/example01.dbf
- FYDul CMD>df 5
- ... ...
- Dul table SH.DIMENSION_EXCEPTIONS
- ........*(Rows:0)
- Dul table SH.CAL_MONTH_SALES_MV
- ........*(Rows:48)
- Dul table SH.FWEEK_PSCAT_SALES_MV
- ........................................................................*(Rows:11266)
- Dul table T_76064.0
- ........*(Rows:0)
- Dul table T_76065.0
- ........*(Rows:0)
- Dul table T_76066.0
- ........*(Rows:0)
- Dul table T_76067.0
- ........*(Rows:0)
- FYDul CMD>show
- 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.
- ok26!
- FYDul CMD>exit
- Good bye!
- oracle@syddbd1::> ls /tmp/dul/output/SH/
- create_tb_CAL_MONTH_SALES_MV.sql create_tb_PROMOTIONS.sql insert_DR$SUP_TEXT_IDX$R.sql
- create_tb_CHANNELS.sql create_tb_SUPPLEMENTARY_DEMOGRAPHICS.sql insert_FWEEK_PSCAT_SALES_MV.sql
- create_tb_COUNTRIES.sql create_tb_TIMES.sql insert_PRODUCTS.sql
- create_tb_CUSTOMERS.sql insert_CAL_MONTH_SALES_MV.sql insert_PROMOTIONS.sql
- create_tb_DIMENSION_EXCEPTIONS.sql insert_CHANNELS.sql insert_SUPPLEMENTARY_DEMOGRAPHICS.sql
- create_tb_DR$SUP_TEXT_IDX$I.sql insert_COUNTRIES.sql insert_TIMES.sql
- create_tb_DR$SUP_TEXT_IDX$R.sql insert_CUSTOMERS.sql lob
- create_tb_FWEEK_PSCAT_SALES_MV.sql insert_DIMENSION_EXCEPTIONS.sql
- create_tb_PRODUCTS.sql insert_DR$SUP_TEXT_IDX$I.sql
- oracle@syddbd1::> tail -3 /tmp/dul/output/SH/insert_CUSTOMERS.sql
- 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');
- 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');
- commit;
--- Fuyuncat ---
上一篇:一条语句帮你分析SQL的性能 | 下一篇: |
本类中的所有文章 |