Problem Commit instant working?? [message #59825] |
Sun, 28 December 2003 18:06 |
sachin kumar gupta
Messages: 157 Registered: March 2003
|
Senior Member |
|
|
Hi all,
I have one question regarding working of commit. Suppose we commit any transaction, then the changes r saved into online redolog file immediately. Now after checkpoint only this information is saved into datafiles. So let us say we commit any transaction & suppose the checkpoint has not yet occured, then how come we r able to retrieve the changes immediately after commit even though the CHKPT has not occured .
Pls. let me know the missing.
TIA,
Sachin K. Gupta
|
|
|
Re: Problem Commit instant working?? [message #59826 is a reply to message #59825] |
Sun, 28 December 2003 18:19 |
Daljit Singh
Messages: 290 Registered: October 2003 Location: Texas
|
Senior Member |
|
|
Hi,
if by "how come we r able to retrieve the changes " u mean that we can't access the committed blocks unless checkpoint, so it is not true. I am putting some light on this concept and if u also explore little more wht u want so it will good for us to explain.
Well at checkpoint not only committed but all the dirty buffers get written to disk. So before checkpoin t all the committed transactions which are also in ur redo log files are available in DB buffers and we can access those blocks directly from buffers.
Now at this point if system crash then these transactions are avaliable in redo logs and oracle will recover them from redo logs in instance recovery.
By this the committed data will never lost.
Daljit Singh
|
|
|
|
Re: Problem Commit instant working?? [message #59841 is a reply to message #59825] |
Mon, 29 December 2003 07:01 |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
Sachin,
one more correction.
"Now after checkpoint only this information is saved into datafiles."
DBWR writes modified blocks(committed or uncommitted) from the buffer cache into the datafiles , not just during the checkpoints but also when it cannot find a 'free buffer' after scanning a threshold (DBWR scan depth) number of buffers, when posted by the Server process or after DBWR timeout(3 seconds).
Also when using incremental checkpoints (DB_BLOCK_MAX_DIRTY_TARGET in 8i) or fast start checkpointing(FAST_START_MTTR_TARGET) the DBWR writes the dirty buffers and incrementally advances the checkpoint position to limit the instance recovery time.
-Thiru
|
|
|
|