checkpoint causes a commit [message #321987] |
Thu, 22 May 2008 01:09 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Does checkpoint causes a commit? Is this bevaiour same in all the versions?
I know DBWR signalls LGWR to write at checkpoint but does it mark the SCN in the redo log buffer also?
An answer of yes or no would do.
|
|
|
|
Re: checkpoint causes a commit [message #321993 is a reply to message #321987] |
Thu, 22 May 2008 01:36 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Michel,
These concepts are real confusing.
Docs won't help alone.
SCN is System commit number.
What i want to know is during a checkpoint, whats the first thing that it does?
As oracle guarantees the dirty buffers to be on redo log fiels before datafiles,does checkpoint triggers LGWR before DBWR and hence update the SCN marker?
Please explain!!
|
|
|
|
Re: checkpoint causes a commit [message #322012 is a reply to message #321987] |
Thu, 22 May 2008 02:42 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Its a vicious circle.
Quote: | DBWR may trigger LGWR to write in log file if some redo verctors that protect blocks of the previous list are not already written
|
Ok,so it is not always that DBWR triggers LGWR.It does so only when it finds that the dirty blocks in the redo are not yet written.
Quote: | There is no relation with commit. SCN may increase but this has no relation with commit (in user sense).
|
WHat i know a commit does is:
- flushes redo to redo log files
-updates the SCN in redo log buffer
-releases locks.
Out of these three two things are happening at checkpoint if need be.
Does locks are also released when LGWR writes at checkpoint on need?
If yes than when DBWR finds some redo not yet written to redo lfiles,then it is not wrong to say a commit occurs at that checkpoint.
This is one scenario.
Second scenario is when LGWR writes to redo log files and requires a logswitch.Now if DBWR has not finished writing dirty blocks to data files that were present at redo log buffer,oracle
cannot reuse that log file and hence it has to wait for DBWR to finish.It is why we get chekcpoint not complete message in the alert log files.
So it is not wrong to say that DBWR and LGWR are not completely independent of each other.
They both rely on each other during there course of action.
|
|
|
|
Re: checkpoint causes a commit [message #322026 is a reply to message #321993] |
Thu, 22 May 2008 03:46 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
abs_amit
Messages: 59 Registered: January 2006 Location: delhi
|
Member |
|
|
checkpoint does not cause a commit;
before making any change in data buffer oracle genrates a redo entry because of "write ahead logging" behavior.
whenever checkpoint occurs it asks DBWn process to write all dirty buffer to the disk (depends on the checkpoin type.
and
before writing dirty buffers, DBWn signals to LGWR process to write all redo entries from redo buffer to redo files.
here "all redo entries" means commited and uncommited both.
checkpoint is just an event which ensure that database is recoverable till that point when checkpoint occurs.it writes everything on the disk commited or uncommited doesn't really matters.
commit/rollback are executed by users. which ensures that changes made by users are permanent now.
So as michel said "There is no relation between checkpoint and commit"
Try to understand them as two different events.
Still have doubt ?
Regards
Amit
[Updated on: Thu, 22 May 2008 03:55] Report message to a moderator
|
|
|
|
Re: checkpoint causes a commit [message #322029 is a reply to message #322028] |
Thu, 22 May 2008 04:02 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
There is no difference between full checkpoint (at shutdown or when alter system is executed or ...) and incremental checkpoint (triggers by one of the fast_start% parameters), only the chekpoint scn differs.
Regards
Michel
|
|
|