Backup Options   «Prev  Next»

Lesson 2 Identify structures required for recovery
Objective Identify the various structures required for recovery.

Identify Structures required for Recovery

What is database recovery?

Before recovery is performed, you need to restore the database. To restore means to bring back an original copy of a file from backup by issuing the operating system COPY command. To recover a database means to make all the restored files current to the same point in time by issuing the RECOVER command. To do this, you apply all or part of the redo information generated by the LGWR (Log Writer)[1] process since the last backup. LGWR records this information in the online redo logs that are archived when the database is operating in ARCHIVELOG mode. The damaged datafiles and control files can be recovered to the last recorded COMMIT before the media failure. The process of recovering datafiles and control files by applying the redo logs is also known as "rolling forward." A minimum of two online redo logs is required by LGWR. Each log switch causes a new log sequence number to be used and assigned to the current log file.

Identify Data Structure required for Database Recovery in Oracle

1) A redo record contains information that describes a single change to the database
1) A redo record contains information that describes a single change to the database. This information includes the bytes before and after the change as well as the transaction number. As a change is made, a redo record is entered in the Redo Log buffer and then flushed to the disk in the online redo logs.

2) Rollback segments hold information which is used during recovery to remove all uncommitted changes
2) Rollback segments hold information which is used during recovery to remove all uncommitted changes from the datafiles that were applied from the redo logs. Once this is accomplished, the data is considered to be in a consistent state.

3) This Redo Log Sequence Number is 168
3) This Redo Log Sequence Number is 168. All changes made to the Oracle database are recorded in redo logs. There must be at least two redo logs per database. During database recovery from an instance or media failure, Oracle applies the appropriate changes in the redo logs to the datafiles. This updates the data in the database to the instant that the failure occurred.

4) The control file is crucial to the functioning of a database
4) The control file is crucial to the functioning of a database. If a control file is not available for writing, then the database will not function properly. The control file is updated continuously while the database is being used. It contains information regarding the physical structure of the database.

  1. A redo record contains information that describes a single change to the database.
  2. Rollback segments hold information which is used during recovery to remove all uncommitted changes from the datafiles that were applied from the redo logs
  3. This Redo Log Sequence Number is 168. All changes made to the Oracle database are recorded in redo logs.
  4. The control file is crucial to the functioning of a database. If a control file is not available for writing, then the database will not function properly.

1) redo records, 2) rollback segments, 3) redo logs, and 4) control file.

For a successful recovery, certain data structures must be in place. The data structure must include
  1. redo records,
  2. rollback segments,
  3. redo logs, and
  4. a control file.
These data structures apply to both NOARCHIVELOG and ARCHIVELOG database recovery.
The next lesson describes the data structures required to restore a NOARCHIVELOG database.

[1]Log Writer(LGWR): Log Writer writes Redo Entries into the online redo logs. After a log fills, a log switch occurs.