Home » RDBMS Server » Server Administration » Instance Recovery
Instance Recovery [message #261151] Wed, 22 August 2007 01:05 Go to next message
gajini
Messages: 259
Registered: January 2006
Senior Member
Hi,

Consider the following steps,

1. uncommitted data is flushed to the disk and
2. corresponding rollback is also flushed
3. corresponding redo is later overwritten
4. instance crash.

How the instance recovery will happen when corresponding redo
is overwritten since redo is required to construct REDO for roll forward
and to construct UNDO for roll backward operation?

Thanks...

Re: Instance Recovery [message #261157 is a reply to message #261151] Wed, 22 August 2007 01:14 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
The COMITTED transactions are in the DB & those not are not.
So exactly what is your question?
Re: Instance Recovery [message #261165 is a reply to message #261151] Wed, 22 August 2007 01:23 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
How the instance recovery will happen when corresponding redo
is overwritten since redo is required to construct REDO for roll forward
and to construct UNDO for roll backward operation?

As blocks are flushed onto disk there is no need to roll forward them only to rollback the data blocks.
So there is no need of redo records.

Regards
Michel
Re: Instance Recovery [message #261180 is a reply to message #261151] Wed, 22 August 2007 01:57 Go to previous messageGo to next message
gajini
Messages: 259
Registered: January 2006
Senior Member
Thanks Michel,

Consider the following steps,

1. uncommitted data is flushed to the disk and
2. corresponding rollback is also flushed
3. committed the transaction mentioned in step1
4. corresponding redo containing commit info is later overwritten
5. corresponding rollback segment is also overwritten
6. instance crash.

Now how the Oracle will find the info to make uncommitted changes in disk to COMMITTED one?
Re: Instance Recovery [message #261192 is a reply to message #261180] Wed, 22 August 2007 02:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is no uncommited data on disk, you flushed them in step 1.
Oracle cleans the ITL in the block at its next access. This is based upon SCN and not redo/undo data.

Regards
Michel
Re: Instance Recovery [message #261542 is a reply to message #261151] Thu, 23 August 2007 00:32 Go to previous messageGo to next message
gajini
Messages: 259
Registered: January 2006
Senior Member
Hi Michel,

I read the following things that will happen after a commit,

"After a commit, the log writer process (LGWR) will write redo log entries from the SGA (Log Buffer) into the online redo log file. The background process DBWr will then copy the 'new' data from the redo log file into the datafile."

Is it true that DBWR will flush committed block from buffer to datafile during commit operation?
Re: Instance Recovery [message #261550 is a reply to message #261151] Thu, 23 August 2007 00:49 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member


Is it true that DBWR will flush committed block from buffer to datafile during commit operation?



Yes/No , No/Yes anyone can do.
Re: Instance Recovery [message #261575 is a reply to message #261542] Thu, 23 August 2007 01:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
The background process DBWr will then copy the 'new' data from the redo log file into the datafile.

I don't know where you read that (please always give the source of what you quote and if possible a link) but this is plain wrong. DBWx never reads log files.

Regards
Michel
Re: Instance Recovery [message #261576 is a reply to message #261550] Thu, 23 August 2007 01:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Arju,
Quote:
anyone can do

Only DBWx flushes block (committed or not) from cache to disk.

Regards
Michel
Re: Instance Recovery [message #261599 is a reply to message #261151] Thu, 23 August 2007 02:02 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Michel, From Concepts.

Quote:
The data changes for a committed transaction, stored in the database buffers of the SGA, are not necessarily written immediately to the datafiles by the database writer (DBWn) background process. This writing takes place when it is most efficient for the database to do so. It can happen before the transaction commits or, alternatively, it can happen some time after the transaction commits.

[Updated on: Thu, 23 August 2007 02:19] by Moderator

Report message to a moderator

Re: Instance Recovery [message #261611 is a reply to message #261599] Thu, 23 August 2007 02:20 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I agree but any time it happens it is DBWx that writes it and not anyone.

Regards
Michel
Re: Instance Recovery [message #261691 is a reply to message #261599] Thu, 23 August 2007 06:19 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Arju, I think you may have read the wrong emphasis on your above quoted statement.

I think you may have read it as
[snip] are not necessarily written immediately to the datafiles by the database writer (DBWn) background process.

Whereas the emphasis should be

[snip] are not necessarily written IMMEDIATELY to the datafiles by the database writer (DBWn) background process.


I could be wrong of course.
Re: Instance Recovery [message #261706 is a reply to message #261691] Thu, 23 August 2007 06:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Thanks, this is exactly what I wanted to mean.

Regards
Michel
Re: Instance Recovery [message #261712 is a reply to message #261706] Thu, 23 August 2007 07:12 Go to previous message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Thumbs Up
Previous Topic: cluster index and non-cluster index
Next Topic: 9i and 10g on single machine??
Goto Forum:
  


Current Time: Sun Dec 04 22:54:55 CST 2016

Total time taken to generate the page: 0.14055 seconds