Database Reference
In-Depth Information
You may want to perform an incomplete recovery for many different reasons:
You attempt to perform a complete recovery but are missing the required archive redo logs or
unarchived online redo log information.
You want to restore the database back to a point in time in the past just prior to an erroneous
user error (deleted data, dropped table, and so on).
You have a testing environment in which you have a baseline copy of the database. After the
testing is finished, you want to reset the database back to baseline for another round of testing.
You can perform user-managed incomplete recovery three ways:
Cancel based
SCN based
Time based
Cancel based allows you to apply archive redo and halt the process at the boundary, based on an archive redo
log file. For instance, say you're attempting to restore and recover your database, and you realize that you're missing
an archive redo log. You have to stop the recover process at the point of your last good archive redo log. You initiate
cancel-based incomplete recovery with the CANCEL clause of the RECOVER DATABASE statement:
SQL> recover database until cancel;
If you want to recover up to and including a certain SCN number, use SCN-based incomplete recovery. You may
know from the alert log or from the output of LogMiner the point to which you want to restore to a certain SCN. Use
the UNTIL CHANGE clause to perform this type of incomplete recovery:
SQL> recover database until change 12345;
If you know the time at which you want to stop the recovery process, use time-based incomplete recovery.
For example, you may know that a table was dropped at a certain time and want to restore and recover the database
up to the specified time. The format for a time-based recovery is always as follows: YYYY-MM-DD:HH24:MI:SS . Here is
an example:
SQL> recover database until time '2012-10-21:02:00:00';
When you perform an incomplete recovery, you have to restore all data files that you plan to have online when
the incomplete restoration is finished. Here are the steps for an incomplete recovery:
1.
Shut down the database.
2.
Restore all the data files from the backup.
3.
Start the database in mount mode.
4.
Apply redo (roll forward) to the desired point, and halt the recovery process
(use cancel-, SCN-, or time-based recovery).
Open the database with the OPEN RESETLOGS clause.
5.
Search WWH ::




Custom Search