Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: rollback after crash
"Pradeep" <agarwalp_at_eeism.com> wrote in message
news:1134577082.919500.136810_at_g43g2000cwa.googlegroups.com...
> Lewis,
>
> thanks for you reply, but i a m not able to understand what you are
> trying to say.
>
>
> Jonathan Lewis wrote:
>> "Pradeep" <agarwalp_at_eeism.com> wrote in message
>> news:1134574000.974721.270670_at_g43g2000cwa.googlegroups.com...
>> > Thought of this situation while going through one of the threads on
>> > asktom on checkpoint.
>> > Suppose
>> > - uncommitted data is flushed to the disk and
>> > - corresponding rollback is also flushed
>> > - corresponding redo is later overwritten
>> > - instance crash.
>> >
>> > How does it recover now ?? or how does is rollbacks the uncommitted
>> > data that is on the disk.
>> >
>>
>>
>> If the transaction is uncommitted, then the
>> rollback will be held open, and cannot be
>> overwritten (undo segment header will have
>> a transaction table slot in state 10).
>>
>> In the event of a crash, any redo that has
>> to be re-applied will still leave the transaction
>> visible as an uncommitted transaction in the
>> rollback segment header.
>>
>> So the transaction will be rolled back.
>>
>>
>>
>> --
>> Regards
>>
>> Jonathan Lewis
>>
>> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>> The Co-operative Oracle Users' FAQ
>>
>> http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html
>> Cost Based Oracle: Fundamentals
>>
>> http://www.jlcomp.demon.co.uk/appearances.html
>> Public Appearances - schedule updated 29th Nov 2005
>
You start a transaction
Mark slot 1 of undo segment header 1 as active call this block S1
Update block T1 of table1
which results in using undo block B1
all three changes result in redo being generated
T1, U1, and B1 are written to disc.
You do NOT commit the transaction.
Redo log is reused several minutes later You do NOT commit the transaction
System crashes
Recovery initiated
Rollforward completes.
T1, U1, and B1 may not have been touched from the moment they were written to disc up to this point.
smon (or is it pmon) starts to read the undo segment header blocks to see if there are any uncommitted transactions after recovery.
Finds U1 with slot 1 marked as active rolls back the transaction, which means reading undo block B1 applying rollback to table block T1 clearing slot 1 of U1
-- Regards Jonathan Lewis http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/appearances.html Public Appearances - schedule updated 29th Nov 2005Received on Wed Dec 14 2005 - 10:28:59 CST
![]() |
![]() |