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: What exactly is writen in the logs.

Re: What exactly is writen in the logs.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 10 Mar 1999 16:55:22 GMT
Message-ID: <36ec93dd.10792759@192.86.155.100>


A copy of this was sent to Doug Cowles <dcowles_at_bigfoot.com> (if that email address didn't require changing) On Tue, 09 Mar 1999 15:49:21 -0500, you wrote:

REDO only captured AFTER images.

rollback is stored in the database and is logged. AFTER images of rollback therefore appear in the REDO logs.

Oracle rolls forward using REDO logs (recovering not only regular 'tables' and such but also recovering rollback segments) and then rollsback any uncommitted transactions from the rollback that was just rolled forward.

So...

>I thought REDO only captured after images, and the rollback segments
>contained before images, which is why if you lost a rollback segment,
>you couldn't roll back. Are you saying rollback info is placed in redo
>logs as well?

the after image of rollback is logged there yes.

>If so, which part?

all changes to rollback.

>You say after images of rollback are indirectly
>stored in the redo. Are you meaning that say for 1 transaction - the rollback
>holds the before information, and the redo holds info about the transaction,
>as well as after images?

redo holds all after images, after images for data you are modifying as well as after images of rollback (which happen to be before images of your transaction).

rollback holds before images.

>In that case, no before image or anything from the
>rollback segments themselves are really sent to the redo logs -- right?
>

right, only after images of rollback (which are before images of your transaction) are sent to redo.

>- Dc.
>
>Thomas Kyte wrote:
>
>> A copy of this was sent to Simmo <famine_at_death.iinet.net.au>
>> (if that email address didn't require changing)
>> On Mon, 08 Mar 1999 10:58:37 +0800, you wrote:
>>
>> >Hi all,
>> >
>> >When data is modified and written out to the logs, is it the before and
>> >after value of the field(s) that are written or the contents of the
>> >block(s) (defined by db_block_size) held in the data buffer cache that
>> >were modified ?
>> >
>>
>> as the name implies -- REDO is written to redo logs, AFTER IMAGEs are written to
>> the logs. BEFORE IMAGES (UNDO) are written to the rollback segments.
>>
>> Some will say that both before and after are written to the redo logs. This is
>> technically not accurate but a common statement. The reason they say this is
>> because rollback is logged as well. Since rollback contains before images, the
>> before images for a change are indirectly stored in the redo however it is after
>> images of rollback, not before images of data blocks.
>>
>> Oracle rolls forward from REDO and then always ROLLS BACK from rollback. It
>> never uses REDO to rollback.
>>
>> redo contains changed bytes typically unless you are in hot backup mode in which
>> case full blocks may be logged in some circumstances (eg: you generate more log
>> while in backup mode typically).
>>
>> >sys info
>> >Sol 2.6 Oracle: 7.3.4
>> >
>> >Regards
>> >
>> >Paul Simmons
>> >Aspiring DBA
>>
>>
>> Thomas Kyte
>> tkyte_at_us.oracle.com
>> Oracle Service Industries
>> Reston, VA USA
>>
>> --
>> http://govt.us.oracle.com/ -- downloadable utilities
>>
>> ----------------------------------------------------------------------------
>> Opinions are mine and do not necessarily reflect those of Oracle Corporation
>
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Mar 10 1999 - 10:55:22 CST

Original text of this message

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