Performing Change-Based Incomplete Recovery
This section describes how to perform recovery to a specified SCN in these stages:
- Prepare for recovery by backing up the database and correct any media failures as described in "Preparing for Incomplete Recovery".
- Restore backup datafiles as described in "Restoring Datafiles Before Performing Incomplete Recovery". If you have a current control file, then do not restore a backup control file.
- Perform media recovery on the restored backup by using the following procedure.
To perform change-based recovery:
- Begin change-based recovery, specifying the SCN for recovery termination. The SCN is specified as a decimal number without quotation marks. For example, to recover through SCN 10034 issue:
- RECOVER DATABASE UNTIL CHANGE 10034;
- Oracle begins the roll forward phase of media recovery by applying the necessary redo log files (archived and online) to reconstruct the restored datafiles. Unless the application of files is automated, Oracle supplies the name it expects to find from LOG_ARCHIVE_DEST_1 and requests you to stop or proceed with applying the log file. If the control file is a backup, then you after the archived logs have been applied you must supply the names of the online logs in order to apply their changes.
- Continue applying redo log files until the last required redo log file has been applied to the restored datafiles. Oracle automatically terminates the recovery when it reaches the correct SCN, and returns a message indicating whether recovery is successful.
- Open the database in RESETLOGS mode. You must always reset the online logs after incomplete recovery or recovery with a backup control file. For example, enter:
- ALTER DATABASE OPEN RESETLOGS;