RE: why does oracle recovery redo before undo?

  • From: "Khedr, Waleed" <Waleed.Khedr@xxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 19 Apr 2004 19:26:02 -0400

Oracle does not recover redo logs, instead it uses its contents to
recover data files including files/TS used by rollback segs.

Waleed
=20

-----Original Message-----
From: Ryan [mailto:ryan.gaffuri@xxxxxxx]
Sent: Monday, April 19, 2004 5:28 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: why does oracle recovery redo before undo?=20


I know how it works. I know that it works. I can't find 'why'? I'm
taking a university database class and my professor says the optimal way
to recover is with undo before redo and so does my book.
Anyone know why Oracle does it the other way?

Here is how I think Oracle performs recovery.

1. Oracle scans the redo log from the end back to the last checkpoint.=20
2. Oracle takes notes of all open transactions at the time of the
checkpoint. Why it was scanning backwards it noted all 'commits'=20
3. If there are any open transactions at the time of the last checkpoint
oracle continues to scan back until it reaches the earliest one.
4. Oracle rolls forward and applies all redo from that point to the end
of the log.
5. Oracle Rollsback all open transactions.

Now my book says the optimal way to do this is to check for all open
transactions at the time of the last checkpoint that have committed
after that checkpoint.

Anyone know more? In particularly know 'why'?=20
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: