Databases Reference
In-Depth Information
Restoring Archived Redo Log Files
Problem
RMAN will automatically restore any archived redo log files that it needs during a recovery process. You shouldn't
normally need to restore archived redo log files. However, you may want to manually restore the archived redo log
files if any of the following situations apply:
You want to restore archived redo log files in anticipation of later performing a recovery; the idea
is that if the archived redo log files are already restored, this will speed up the recovery operation.
You need to restore the archived redo log files to a nondefault location and/or multiple
nondefault locations, either because of media failure or because of storage space issues.
You need to restore specific archived redo log files because you want to inspect them via
LogMiner.
Solution
This solution is divided into two sections: restoring to the default location and restoring to a nondefault location.
Restoring to Default Location
The following command will restore all archived redo log files that RMAN has backed up:
RMAN> restore archivelog all;
If you receive an error such as this:
RMAN-06025: no backup of archived log...
RMAN can't restore an archive log file that it can't find in a backup piece. Verify which archive redo logs have
been backed up via:
RMAN> list backup of archivelog all;
If you want to restore from a specified sequence, use the from sequence clause. This example restores all
archived redo log files from sequence 40:
RMAN> restore archivelog from sequence 40;
If you want to restore a range of archived redo log files, use the from sequence and until sequence clauses or the
sequence between clause, as shown here. These commands restore archived redo log files from sequence 40 through
43 (inclusive) using thread 1.
RMAN> restore archivelog from sequence 40 until sequence 43 thread 1;
RMAN> restore archivelog sequence between 40 and 43 thread 1;
You can also specify an SCN or a time, for example:
RMAN> restore archivelog from scn 900321 until scn 930095;
RMAN> restore archivelog from time 'sysdate - 1';
 
Search WWH ::




Custom Search