Database Reference
In-Depth Information
FiGUReĀ 2.2 Database with data files restored correctly for incomplete recovery
SCN the Same
SCN the Same
SCN the Same
SCN the Same
Datafile #1
SYSTEM
Tablespace
SCN: 1230
Datafile #2
SYSAUX
Tablespace
SCN: 1230
Datafile #3
UNDO
Tablespace
SCN: 1230
Datafile #4
USERS
Tablespace
SCN: 1230
You want to recover to SCN 1234. All datafiles are at SCN 1230. It's now easy
to recover them all to SCN 1234.
Now that you have restored all the database data files and the needed archived redo logs,
you are ready to execute your incomplete database recovery.
Performing an Incomplete Recovery
Having restored the database data files, recovery is pretty easy. First, you determine the type of
recovery that you want to do, and then you perform the recovery using the RECOVER DATABASE
command. Finally, you open the database. Let's look at these steps in some more detail next.
Determining the Type of Point-in-Time Recovery
There are three types of point-in-time recovery that you can perform:
Time-Based Recovery Time-based recovery is based on the time that you want to recover
your database to. Time-based recovery is granular to the nearest second.
Log Sequence-Based Recovery Log sequence-based recovery is based on defining the log
sequence number you wish the database to be recovered to. You will need to determine the
correct log sequence number. The V$ARCHIVED_LOG and V$LOG views may be helpful in making
this determination.
Change-Based Recovery Change-based recovery is based on the SCN that you wish
to restore your database to. You can determine what the current SCN of the database is
by querying the CURRENT_SCN column of the V$DATABASE view. You can also associate a
given time to an approximate SCN by using the TIMESTAMP_TO_SCN , SCN_TO_TIMESTAMP ,
or SMON_SCN_TIME view.
Perform Your Point-in-Time Recovery
Regardless of which of the three point-in-time recoveries you choose to perform, the overall
process is very similar. You will use the RECOVER DATABASE command for your recovery. Each
recovery type will take a different keyword, as shown here:
Time-Based Recovery To perform time-based recovery, use the RECOVER DATABASE UNTIL
TIME command. The format of the time in the command is 'yyyy-mm-dd:hh24:mi:ss' ,
which is consistent in each Oracle database (so it is not dependent on parameters such as
Search WWH ::




Custom Search