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

Home -> Community -> Usenet -> c.d.o.server -> Re: A Theoretical Situation

Re: A Theoretical Situation

From: Steve Adams <steve.adams_at_acslink.net.au>
Date: 1997/08/03
Message-ID: <33e4c6b1.5340028@nntp.peg.apc.org>#1/1

Hi Thomas,

These words ...
>Remember, Oracle logs only contain REDO, no UNDO data. They are not used to
>rollback in any circumstance. They can only redo transactions not undo them.
suggest that the redo stream does not contains change vectors for undo blocks, which of course is not correct.

The rollback segment changes cannot be inferred from the data block redo, because details such as the transaction table slot and wrap numbers, and the exact undo block addresses used may be necessary for subsequent read consistency.

Regards, Steve Adams



On Sat, 02 Aug 1997 02:10:07 GMT, tkyte_at_us.oracle.com (Thomas Kyte) wrote:

>Oracle stores redo in redo logs.
>Oracle stores undo in rollback.
>
>Before a log file can be reused, all blocks affected by redo in that log file
>must be checkpointed (including rollback blocks). Every log switch fires a
>checkpoint in the background and before we wrap back to the first log file, the
>checkpoint must be completed.
>
>In your example, when we wrap back to the 'first' log file, we will have
>checkpointed (flushed to disk) all blocks so we would not need to 'redo' them.
>This includes the rollback segment blocks (we won't need to redo the undo at
>this point, it is flushed to disk). If the system fails at this point, we can
>rollback because all of the undo we need is safely stored in disk in the
>rollback segment.
>
>As long as you have enough rollback for the transaction, you can have very small
>amounts of online redo log files. The rollback will be flushed as part of the
>normal checkpoint process and won't need to be redone.
>
>Remember, Oracle logs only contain REDO, no UNDO data. They are not used to
>rollback in any circumstance. They can only redo transactions not undo them.
>
>On 1 Aug 1997 14:25:53 GMT, "Alan Gano" <alan.gano_at_mfa.com> wrote:
>
>>Hi,
>>
>>Assuming an instance of this configuration:
>>- 5 redo logs of 10K each.
>>
>>Assume this situation:
>>- A single transaction (say an UPDATE) produces more than 50K of redo
>>information, filling the redo logs, and then wraps around.
>>- There is plenty of rollback space for the transaction.
>>- The transaction is not committed.
>>
>>In this situation, some redo information concerning the transaction is
>>being overwritten or written off to offline archive logs. I would assume
>>that at least some of the modified blocks for this offlined/overwritten
>>information has been getting written out to the datafiles by DBWR.
>>
>>
>>Now, my question is, if the instance crashes (or shutdown aborts), how is
>>Oracle going to roll back all the blocks changes in the transaction if they
>>are no longer in the redo logs?
>
>Thats the key point to understand. Rollback data is not in the redo, its in
>rollback.
>
>>As I understand Oracle's mechanism for recovery, it cannot roll back the
>>transaction. Is this correct? If so, what does the server do in this

            ^^^^^^^^^^^^^ no, not at all.

>>case? I imagine that if it's in archive mode, it could demand media
>>recovery, but what a surprise that would be! And what about non-archive
>>mode?
>>
>>Thanks!
>>
>>Alan.
>>
>>
>
>
>Thomas Kyte
>tkyte_at_us.oracle.com
>Oracle Government
>Bethesda MD
>
>http://govt.us.oracle.com/ -- downloadable utilities
>
>----------------------------------------------------------------------------
>Opinions are mine and do not necessarily reflect those of Oracle Corporation


My real email address is: steveadams_at_acslink.net.au Received on Sun Aug 03 1997 - 00:00:00 CDT

Original text of this message

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