Lesson 2 | Identifying an incomplete recovery situation |
Objective | Describe under what situations an incomplete recovery is required. |
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. |