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: USER <user_at_host.domain.com>
Date: Wed, 10 Mar 1999 14:44:42 -0500
Message-ID: <36E6CBAA.63E1360F@host.domain.com>


Hi, Thomas:

I think that was the most profound clarification I've ever seen. It's a veritable epiphany.

Though a little new to this, and not having encountered an explicit description of the sort you sent, this was how I'd subconsciously envisaged Oracle transaction processing. I would appreciate it if you could indulge me by throwing more light on this. An example scenario for an update/delete would help.

< 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). When you say AFTER images of rollback, you mean changes to the rollback segment: and only the old data is kept in the rollback segment. Thus, after images of rollback are before images of the transaction in question.

So, if you use copies of redo logs during recovery, but have lost the rollback segment(s),
you have the results of phantom transactions that were never meant to be ultimately committed.

Thus, even if you have the AFTER image of the rollback segments, and thus the old data, Oracle
does not know that a rollback occurred, and thus keeps these rows, resulting in data inconsistency
of a different sort.

So this begs the question: Under WHAT specific conditions, can we use ONLY the redo logs to reconstruct the rollback segments (as the redo logs have the information needed to do this) and ignore the rollback segments altogether? (Say we set up a scenario in which we deliberately blow away the rollback segs, so as to test recovery.)

Please confirm my humble take on this, and provide a blow-by-blow scenario of an update/delete if possible.

Thanks so much!

   Regards

Thomas Kyte wrote:

> 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.
>
> >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.
>
Received on Wed Mar 10 1999 - 13:44:42 CST

Original text of this message

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