Databases Reference
In-Depth Information
By running list failure and advise failure , you will gain an understanding as to what the problem is and
how to fix it. You can use the repair failure command to run the repair script generated by the Data Recovery
Advisor:
RMAN> repair failure;
Here is a partial listing of the output for this example:
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/o12c/o12c/hm/reco_1800500206.hm
contents of repair script:
# restore and recover datafile
restore ( datafile 4 );
recover datafile 4;
sql 'alter database datafile 4 online';
You will be prompted to specify whether you want to run the repair script:
Do you really want to execute the above repair (enter YES or NO)?
If you're satisfied with the repair script commands, then enter YES and hit Enter . The output will vary based on
the type of restore and recovery that is performed. Here's a partial snippet of the output of restoring and recovering
just one data file:
channel ORA_DISK_1: piece handle=/u01/app/oracle/product/12.1.0.1/db_1/dbs/05ng5lcb_1_1
tag=TAG20120715T152811
channel ORA_DISK_1: restored backup piece 1
Finished restore at 15-JUL-12
Starting recover at 15-JUL-12
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 15-JUL-12
sql statement: alter database datafile 4 online
repair failure complete
The prior output indicates RMAN successfully repaired the failure. You can validate that the failure has been fixed
by running list failure :
RMAN> list failure;
no failures found that match specification
How It Works
We recommend that you run the repair failure command only after you have run the list failure and advise
failure commands. Repairing the problem should be the last step performed. You should use the Data Recovery
Advisor to repair failures only after you thoroughly understand what the failure is and what commands will be run to
repair the failure.
 
Search WWH ::




Custom Search