Transactions: blocks/pages SCN and ordering

Giganews Newsgroups
Subject: Transactions: blocks/pages SCN and ordering
Posted by:  markpapadakis (markpapadak…@gmail.com)
Date: Thu, 29 Nov 2007

Greetings,

I was wondering if someone would shed some light to the following
question, described as follows:
Transaction 7 begins
time passes
A transaction with SCN 8 updates data block 64 and commits. Data block
64 now is 'owned' by SCN = 8
time passes
Transaction A begins ( gets SCN = 10)
time passes
Transaction B begins ( gets SCN = 20)
time passes
Transaction B updates a row which requires updating the disk block 64
Transaction B commits and disk block 64 gets an 'ownership' with SCN =
20
time passes
Transaction A updates block 64 (noone has locked it now)
Transaction A commits and block 64 gets an 'ownership' with SCN = 10

Can this happen?
Should Transaction A rollback because when it wishes to update it,
that data block is owned by
an SCN greater than the one assigned to it on initialization?  If it
shouldn't, then when transaction with SCN wishes to read in the data
from that block in accordance to the revision implied by its SCN:
1.Should read in the data block
2. Data block is owned by SCN = 10, but we need latest revision before
SCN = 7
3. Jumps to the undo block, but the SCN of the undo block is 20. It
should see then that 20 > 7, therefore it would consider the undo
block overwritten by a more recent transaction and would issue a
snapshot too old. Right?

I have very little experience with Oracle Database Server. I was just
wondering whether the revisions of pages should be in sequential
order, or not.

Thank you very much,
Mark Papadakis

Replies