Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
RMAN "list failure" command Written by Martin Friday, 25 January 2008 16:01 - Last Updated Tuesday, 19 February 2008 18:25 RMAN 11g has a nice new feature which could save you precious time during a recovery situation. The new list failure & advice failure commands don't replace a seasoned DBA, but can come in handy at times. Assume the following scenario: you created a new tablespace for an application and want to populate it: SQL> create tablespace incident 2 datafile '/u01/oradata/ORCLXEN/incident_01.dbf' size 10M 3 extent management local 4 segment space management auto uniform size 32k; Tablespace created. Now we assume the datafile goes offline - for example due to a disk failure. The following command simulates that situation: SQL> !mv /u01/oradata/ORCLXEN/incident_01.dbf /u01/oradata/ORCLXEN/incident_01.dbf.gone Of course you don't notice that straight away and get going: SQL> create table martin.whoops ( id number ) tablespace incident; create table martin.whoops ( id number ) tablespace incident * ERROR at line 1: ORA-01658: unable to create INITIAL extent for segment in tablespace INCIDENT OK, and here we are. This is a rather common problem. What do you do? In the past you'd look around the various dictionary views and the alert log and eventually arrived at the conclusion that a disk was missing. Fri Jan 25 14:42:56 2008 Errors in file /u01/app/oracle/diag/rdbms/orclxen/ORCLXEN/trace/ORCLXEN_ckpt_27081.trc: ORA-01110: data file 5: '/u01/oradata/ORCLXEN/incident_01.dbf' ORA-01116: error in opening database file 5 ORA-01110: data file 5: '/u01/oradata/ORCLXEN/incident_01.dbf' ORA-27041: unable to open file Linux Error: 2: No such file or directory Additional information: 3 1/3 RMAN "list failure" command Written by Martin Friday, 25 January 2008 16:01 - Last Updated Tuesday, 19 February 2008 18:25 ... Checker run found 1 new persistent data failures RMAN now can come up with advise and give us a hand: RMAN> list failure; using target database control file instead of recovery catalog List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------982 HIGH OPEN 25-JAN-08 One or more non-system datafiles are missing Ooops! Now what can we do? RMAN> advise failure; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------982 HIGH OPEN 25-JAN-08 One or more non-system datafiles are missing analyzing automatic repair options; this may take some time allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=290 device type=DISK analyzing automatic repair options complete Mandatory Manual Actions ======================== no manual actions available Optional Manual Actions ======================= 1. If file /u01/oradata/ORCLXEN/incident_01.dbf was unintentionally renamed or moved, restore it Automated Repair Options ======================== 2/3 RMAN "list failure" command Written by Martin Friday, 25 January 2008 16:01 - Last Updated Tuesday, 19 February 2008 18:25 Option Repair Description ------ -----------------1 Restore and recover datafile 5 Strategy: The repair includes complete media recovery with no data loss Repair script: /u01/app/oracle/diag/rdbms/orclxen/ORCLXEN/hm/reco_4081647839.hm The contents of the file is: # restore and recover datafile sql 'alter database datafile 5 offline'; restore datafile 5; recover datafile 5; sql 'alter database datafile 5 online'; RMAN> list failure; no failures found that match specification 3/3