Recovery with Archiving  «Prev  Next»

Lesson 2 Identifying implications of instance failure with an ARCHIVELOG database
Objective Describe what happens if the instance fails.

Identifying Implications of instance failure with an ARCHIVELOG Database


Instance failure means an abrupt end to an Oracle instance due to either hardware or software problems. The (SGA) system global area and background processes cease to function. Therefore, any data in the buffer that had not already been written to a datafile at the time of the instance failure will be lost. Complete recovery recovers the damaged datafiles as well as all data that had been committed prior to the moment of instance failure.
Before you can completely recover the datafiles up to the time of failure, you must have the following in place:
  1. A valid backup after the database was set in ARCHIVELOG mode. This backup must include the datafiles needing recovery.
  2. All archive logs from the last backup up to the time the instance failure occurred.
To perform a complete recovery, you must follow the steps below:
  1. For an open database recovery, place the damaged datafiles offline.
  2. A closed database recovery can be performed with the files online.
To ascertain datafile online/offline status, you can query the V$DATAFILE and V$TABLESPACE views.
  1. Restore the damaged or lost datafiles.
  2. Place the database in either mount or open mode.
  3. Recover the datafiles using the RECOVER command.

Restoring all files, including control files, redo logs, the parameter file, and the password file, brings your data back in time. However, for complete recovery, you do not want to restore the database to a previous point in time or restore the online redo log files. Instead, you want to restore to the last committed transaction. To do this, you must synchronize the datafiles with the most recent time recorded in the control file. It is easy to perform this recovery if the latest control file has survived the media failure. You can ensure control file survival by maintaining multiple copies on different disks.
The next lesson describes different methods of recovery.