Tuesday, 29 March 2016

What happens actually in case of instance Recovery?


While Oracle instance fails, Oracle performs an Instance Recovery when the associated database is being re-started.
Instance recovery always occurs in 2 steps:

Cache recovery:
Changes being made to a database are recorded in the database buffer cache as well as redo log files simultaneously. When there are enough data in the database buffer cache, they are written to data files.
Assume,  If an Oracle instance fails before these data are written to data files, Oracle uses online redo log files to recover the lost data when the associated database is re-started. This process is called cache recovery.


Transaction recovery:
 When a transaction modifies data in a database (the before image of the modified data is stored in an undo segment which is used to restore the original values in case the transaction is rolled back). At the time of an instance failure, the database may have uncommitted transactions.
It is possible that changes made by these uncommitted transactions have gotten saved in data files. To maintain read consistency, Oracle rolls back all uncommitted transactions when the associated database is re-started.

Oracle uses the undo data stored in undo segments to accomplish this. This process is called transaction recovery.


No comments:

Post a Comment