Wednesday, January 30, 2013

Oracle: Recovery Types

Oracle recovery refers to the process of restoring a physical backup with all the changes that have been made to the database since the last backup. The main purpose of recovery is to prevent data loss after corruption or any other disaster. There are four types of recovery in Oracle:

Instance Recovery: Instance recovery is performed in Oracle Real Application when database server crashes. The two most common reasons of database crash is power failure or abnormal termination of system. Instance recovery is an automatic process performed by surviving instance to recover data that was lost due to database server instance failure. Instance recovery is performed in the case of failure of single instance.
Crash Recovery: It is performed when Oracle database is started first time after the crash. The main motive of crash recovery is to bring the database back to its consistent state by preserving the committed transactions. Online datafile and redo log files are used to save the changes upto the moment of failure.
Media recovery: It is performed in response to media failure. It recovers damaged tablespaces, datafiles and control files. Database should be in offline mode while performing media recovery. You cannot open a datafile before the completion of media recovery. There are two types of media recovery:

1. Complete Recovery: In complete recovery whole database is recovered without any loss of data. It recovers database to the recent point in time. There is no loss of committed transactions.
2. Incomplete Recovery: It is also known as point-in-time recovery. It has following recovery options:

  •  Tablespace point-in-time recovery: It allows user to recover any number of tablespaces to point-in-time.
  • Point-in-time recovery: It allows user to recover database upto a specified point-in-time.
  • Cancel-based Recovery: It stops recovery as soon as you issue Cancel command.

Block Media Recovery: It is performed to recover one or more damaged data block. Whole database remain online during recovery except the affected blocks. Perform block media recovery only for those blocks that have been marked corrupted.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...