RelationalDBDesign RelationalDBDesign


Incomplete Recovery   «Prev  Next»
Lesson 2 Identifying an incomplete recovery situation
Objective Describe under what situations an incomplete recovery is required.

Identifying an Incomplete Recovery Situation

Incomplete recovery reconstructs the database as it was at a specified time before the media failure. It is a useful procedure when there are user errors, and damaged or lost online redo logs, archived logs, or control files. The table below describes situations where incomplete recovery of an ARCHIVELOG database is necessary.

Types of Failures

Several circumstances can halt the operation of an Oracle database. The most common types of failure are described in the following table

Failure Description

SITUATION DESCRIPTION
User error A user accidentally drops an important table, or commits some bad data into the database. Requires a database to be recovered to a point in time before the error occurred. For example, a user could accidentally drop a table. To enable recovery from user errors and accommodate other unique recovery requirements, Oracle provides exact point-in-time recovery. For example, if a user accidentally drops a table, the database can be recovered to the instant in time before the table was dropped.
Statement failure Occurs when there is a logical failure in the handling of a statement in an Oracle program.When statement failure occurs, any effects of the statement are automatically undone by Oracle and control is returned to the user.
Process failure Results from a failure in a user process accessing Oracle, such as an abnormal disconnection or process termination. The background process PMON automatically detects the failed user process, rolls back the uncommitted transaction of the user process, and releases any resources that the process was using.
Instance failure Occurs when a problem arises that prevents an instance from continuing work. Instance failure can result from a hardware problem such as a power outage, or a software problem such as an operating system failure. When an instance failure occurs, the data in the buffers of the system global area is not written to the datafiles.
After an instance failure, Oracle automatically performs instance recovery. If one instance in a RAC environment fails, then another instance recovers the redo for the failed instance. In a single-instance database, or in a RAC database in which all instances fail, Oracle automatically applies all redo when you restart the database.
Loss of archived log files A complete recovery failed because an archived log file is lost or corrupt.
Media (disk) failure An error can occur when trying to write or read a file on disk that is required to operate the database. A common example is a disk head failure, which causes the loss of all files on a disk drive. Different files can be affected by this type of disk failure, including the datafiles, the redo log files, and the control files. Also, because the database instance cannot continue to function properly, the data in the database buffers of the system global area cannot be permanently written to the datafiles.
A disk failure requires you to restore lost files and then perform media recovery. Unlike instance recovery, media recovery must be initiated by the user. Media recovery updates restored datafiles so the information in them corresponds to the most recent time point before the disk failure, including the committed data in memory that was lost because of the failure.
Loss of control file The current control file is not mirrored and database structure has changed, but a backup of the older control file exists.
Loss of redo logs Redo logs are not mirrored and a redo log is lost before it is archived.

Oracle RMAN Backup and Recovery
Incomplete recovery can only be applied with a database in ARCHIVELOG mode.

Requirements

To perform an incomplete recovery, you must have the following files:
  1. A valid offline or online backup of all the database files
  2. All archived logs from the backup until the specified time of recovery

Limitations

There are a few limitations to this procedure. When you perform an incomplete recovery of the database, you must be aware that you will lose any data that was committed between the time of recovery and the time of media failure. Thus, it is important to notify users to re-enter the data that was lost during this particular time period. Because data is lost, you only perform incomplete recovery when it is absolutely necessary. In addition, incomplete recovery can be a complicated and time-consuming process, so consider your options carefully before you choose this procedure.The next lesson explains four types of incomplete recovery.