Total Pageviews

Thursday, 17 January 2013

You suspect your archived redo log is bad/corrupted. !!


You need to perform a database recovery, but you suspect one of your archived redo log files is bad. You want to perform a test to see whether all of the redo is available and can be applied.


The recover ... test command instructs Oracle to apply the redo necessary to perform recovery but does not make the changes permanent in the datafiles. When you recover in test mode, Oracle applies the required redo but rolls back the changes at the end of the process. This example starts up the database in mount mode, restores the entire database, and then does a test recovery:

RMAN> connect target /
RMAN> startup mount;
RMAN> restore database;
RMAN> recover database test;
Here is a partial snippet of the output showing that the test recovery was successful:

ORA-10574: Test recovery did not corrupt any data block
ORA-10573: Test recover tested redo from change 847960 to 848243
ORA-10570: Test recovery complete

You can test a recovery with most recover commands. Here are some examples:
RMAN> recover tablespace users, tools test;
RMAN> recover datafile 1 test;

If you’re missing archived redo log files or online redo log files that are needed for recovery, you’ll receive a message similar to this:
ORA-06053: unable to perform media recovery because of missing log