Re: can somebody help what exactly the rollback segment and redo log files contain..

From: FaheemRao <faheemrao_at_yahoo.com>
Date: 23 Oct 2001 01:01:49 -0700
Message-ID: <43b58913.0110230001.644727cc_at_posting.google.com>


redo Log Contains both Committed and Uncomitted transaction. and Rollback Contains the Information that what transaction needs Rollback.

Now if an Instance crash occur then , there are two phase of recovery

1.. Rolling farward (cache recovery)
2.. Rolling Back (transaction recovery)

In Rolling Farward all the Information from redo log (may include archived log files as well) applied to the Database . Now database Contains both the Committed and uncommitted transaction .

In second Phase the Rolling back , the Information in Rollback Segments applied to the Database . Now all the transaction that were not commited are filtered off and the resulting (commited) transaction remain in the Database.
So this Completes the Instance recovery.

Remeber the uncommited transaction could be in the Database (already written to database by LRU algoritham) before the time of Crash or expose to Database at the time of Roll farward.

Faheem Rao.

get4ked_at_yahoo.com (Ford) wrote in message news:<b2b9197f.0110201850.5422ef0d_at_posting.google.com>...
> The redo log contains both the new values as well as the undo
> information. Undo is just another block type in the database that gets
> logged. If you did'nt commit you txn and the instance crashed but the
> blocks had made it to disk - after doing rollforward recovery you'd
> now have the new value in the block which was'nt commited so you'd
> need the undo to roll it back.
>
> "andrija" <ar35644_at_fer.hr> wrote in message news:<9qomt9$b553$1_at_as201.hinet.hr>...
> > "sudhakar Marampelly" <marampelly_s_at_bharatmail.com> wrote in message
> > news:50e5f826.0110182056.2db4a3ec_at_posting.google.com...
> > > Hai!
> > >
> > > iam having some doubt in oracle..
> > > let me explain a scenario..
> > > there is a table A in the database with 1,2,3 rows..
> > > now you are inserting a new row 4 into table A.
> > > so what are the additions to the rollback segment and redo-log file as
> > > well..
> > > please some body help me..what exactly the rollback segment and
> > > redolog files contain..how it will be helpful incase of a recovery..
> > >
> > > what i understood in was that..
> > > if a value x=4 is there in the D/B and you are changing the value to a
> > > new value..let say x=7..then rollback segment will have the old
> > > value(x=4) and redo log file will have both x=4 and x=7..
> > > please somebody help me to get of this problems..
> > >
> > > thanks in advance..
> > > regards
> > > Sudhakar Marampelly
> >
> > I don't thik that redo log will have both values (vhat's the point of redo
> > log then?).
> > Thing is, when you finish your transaction which inserts or changes data in
> > the table, changes will not be written on disk immediately. Changes are in
> > memory until DBW process writes them down. If there is a, let's say, power
> > failure before DBW writes changes down, on startup Oracle will search the
> > redo-log and roll-forward your transaction.
Received on Tue Oct 23 2001 - 10:01:49 CEST

Original text of this message