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: snapshot to old again

Re: snapshot to old again

From: Doug Cowles <dcowles_at_bigfoot.com>
Date: Wed, 26 May 1999 12:31:42 -0400
Message-ID: <374C21EE.C547B83C@bigfoot.com>


A couple of things -

Nuno Souto wrote:

> Hi Doug.
>
> I always get confused trying to follow the reasonings on this
> subject.
>
> The thing is basically this:
>
> There is a number that gets written on every block when it gets updated.
> It's called the SCN and it keeps growing.
>
> The number is sequential and every updater and reader gets one and one only.
>
> Now:
>
> TRA starts a query and keeps it going. It gets XXXX as the SCN.
> The query now wants all blocks to have SCN <= XXXX,
> because that will mean it is reading a consistent view of the data.
> Any block that has a SCN higher than XXXX means it has been
> updated after TRA started, so we need to look up rlbseg
> for same block with a SCN < XXXX.
>
> TRB starts after TRA, gets a SCN of ZZZZ = XXXX+20) (just an example!),
> reads and updates a block ahead of TRA. It sets the block
> number to ZZZZ in the table. A copy of the block
> now lives in rollback segment with whatever number it last
> had (< ZZZZ and < XXXX). Let's call it SCN AAAA.
>
> TRB commits and goes to heaven. ORACLE does not wipe the
> block that was written to rlbseg just yet, because there
> is another transaction busy on this table.
>

This SCN AAAA cannot be sitting in the rollback segment really can it? If is therebecause another transaction is on this table than isn't there a risk that a rollback to
block SCN AAAA wipes out the committed transaction from TRB? which now lives in the datafile as ZZZZ?

> TRC (or even TRA if it is updating/committing as it reads)
> comes in and does a gazillion updates that use up all the space
> on rollback segment and wipe the copy of SCN AAAA from there).
>

The thing is, in my situation, the rollback segment never came near it's maximumsize, it extended about 100MB, but there was much more room for it to extend,
which makes me wonder by the SCN AAAA's would be wiped out.

> Eventually, TRA comes in and tries to read the block. It gets it
> from the table as block ZZZZ, which is larger than XXXX.
> So it now goes to try and read it off rlbseg with a SCN < XXXX.
>
> None there. Note that due to load, that block might have had
> other SCN copies in the rlbseg, but the point is that none of them
> is < XXXX now.
>
> Snapshot too old
>
> Hope that makes it clearer.
>
> How's the bub?
> --
> Cheers
> Nuno Souto
> nsouto_at_nsw.bigpond.net.au
> http://www.users.bigpond.net.au/the_Den
> Doug Cowles <dcowles_at_bigfoot.com> wrote in message
> news:37433BD0.74CD72F1_at_bigfoot.com...
> > I'm sure this topic has been beaten to death on this group but hopefully
> > a few people won't mind beating it some more. I created a very large 1G
Received on Wed May 26 1999 - 11:31:42 CDT

Original text of this message

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