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: Nuno Souto <nsouto_at_nsw.bigpond.net.au>
Date: Thu, 20 May 1999 21:21:39 +1000
Message-ID: <7i0s0t$m20$1@m2.c2.telstra-mm.net.au>


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.

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).

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 Thu May 20 1999 - 06:21:39 CDT

Original text of this message

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