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: Doug Cowles <dcowles_at_bigfoot.com>
Date: Tue, 16 Mar 1999 10:10:44 -0500
Message-ID: <36EE7474.E8EEC667@bigfoot.com>


If I may once again try to interpret things in this interesting thread. First of all, to clarify a before and after image of a rollback. A rollback either grows, logging before images, or shrinks, rolling back by rewriting before images of data blocks. I take it, a before image of the rollback is when it grows, and an after images is when it rolls back. Is this right?

If this is right, then only a rolled back transaction (after images of rollback segments), actually makes it into the redo logs. Is this right?

So, if you lose your rollback segment (which contains uncomitted transactions), you cannot rebuild either the rollback segment, or recover properly, because

  1. The redo logs have logged information as if the transaction was committed.
  2. And, you have no record of the before image because you have a)lost the roll back segment b)since the rollback was never "rolled back", you don't have the after (before) images of your data in the redo logs.

Is this why a message to call technical support usually shows up if you lose a rollback segment?

What do they do for you anyhow?

I concur by the way, this has been an epiphany .. thanks so much for the info. - Dc.

Thomas Kyte wrote:

> A copy of this was sent to USER <user_at_host.domain.com>
> (if that email address didn't require changing)
> On Wed, 10 Mar 1999 14:44:42 -0500, you wrote:
>
> >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.
> >
>
> Yes, after images of rollback (redo of the rollback) just happen to be before
> images (undo) of your transaction.
>
> >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.
> >
>
> you cannot use redo logs to do recovery without using the rollbacks as well. We
> will roll the rollback forward (boy does this get confusing sounding) and then
> ROLLBACK from the roll'ed forward rollback.
>
> If you zap your rollback or do hot backups and don't ever backup your rollback
> (i've seen people do that, baaaaad scene), you cannot really use your logs to
> recover. We need to recover rollback and THEN after its recovered, rollback
> from it.
>
> so, if you use copies of redo logs during recovery but have lost the rollback --
> you are "hosed". Need that hot backup of rollback to recover. Rollback and
> redo are not 100% in sync -- we need BOTH.
>
> >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.
> >
>
> there are some magic init.ora's that might be able to do this but its only used
> to recover data for a new database you will be creating :) call support for
> this.
>
> need to have that hot backup of your rollback -- we need to recover it.
>
> >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.)
> >
>
> none, there are no circumstances that you can use only the redo to reconstruct
> the rollback. We need the hot backup of the rollback and we need to roll it
> forward. The redo does not have all of the information you need -- we need the
> starting rollback segment image to roll it forward.
>
> If you blow away your rollback you had better have a hot backup of them to
> recover with.
>
> >Please confirm my humble take on this, and provide a blow-by-blow scenario of an
> >update/delete if possible.
> >
>
> don't know what you would be looking for here. the udpate would get logged to
> redo (new bytes into redo), it generates rollback (old bytes into rollback),
> rollback generates log of itself. delete is similar.
>
> >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.
> >>
>
>
> 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 Tue Mar 16 1999 - 09:10:44 CST

Original text of this message

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