Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> why does oracle recovery redo before undo?

why does oracle recovery redo before undo?

From: Ryan <ryan.gaffuri_at_cox.net>
Date: Mon, 19 Apr 2004 17:28:27 -0400
Message-ID: <214c01c42655$41395ad0$51a36244@ryan2le36ofjce>


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.
  2. Oracle takes notes of all open transactions at the time of the checkpoint. Why it was scanning backwards it noted all 'commits'
  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'?



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Mon Apr 19 2004 - 16:27:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US