Thursday, August 4, 2011

Difference between Rolling back and Rolling forward

Rolling back and Rolling forward are the two most common operations performed during instance recovery.

Have a look how they are different in nature.However first rolling forward occurs then rolling back during crash recovery:

Rolling forward: During this operation, the Oracle server will update all datafiles with the information from the redo log files. The online redo log files are always written to before the data is recorded in the datafiles. Thus, an instance recovery may usually leave the online log files “ahead” of the datafiles.

Rolling back: During this operation, uncommitted changes that were added to the datafiles during the rollforward operation are rolled back. Oracle does this by using the undo tablespace contents to return uncommitted changes to their original states. At the end of the rollback stage, only committed data at the time of the instance failure is retained in the datafiles.