RelationalDBDesign 





Backup Options  «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

Implications

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.

Disabling the Fast Recovery Area

If you have enabled Flashback Database or use the fast recovery area for archive logs, then take the appropriate steps from those that follow below. Otherwise, skip to Step 3:
  1. If Flashback Database is enabled, then disable it before you disable the fast recovery area.
    ALTER DATABASE FLASHBACK OFF;
    
  2. If you are using the fast recovery area for archive logs, then set the initialization parameter LOG_ARCHIVE_DEST_n to use a non-fast recovery area location. For example, to change the fast recovery area for LOG_ARCHIVE_DEST_1 to a non-fast recovery area location, use the command ALTER SYSTEM SET:
    LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST'
    ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=/ORACLE/DBS/';
    
  3. Disable the fast recovery area initialization parameter.
    ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='';