Checkpoint [message #173444] |
Mon, 22 May 2006 08:41 |
gajini
Messages: 262 Registered: January 2006
|
Senior Member |
|
|
Checkpoint occurs mainly for two reasons,
1) Checkpoint occurs by means of Log Switch,Data buffer full,etc.. to move data from memory to disk & from log buffer to logfiles
2) Checkpoint occurs at commit to move data from memory to disk & from log buffer to logfiles
How Oracle identifies difference between those checkpoint(as mentioned in 1) and checkpoint which occurs at commit so that in case of recovery it'll recover upto the commit checkpoint,eventhough some checkpoints(other than commit) occurred very recent after the commit checkpoint?
|
|
|
|
Re: Checkpoint [message #173527 is a reply to message #173444] |
Mon, 22 May 2006 23:34 |
gajini
Messages: 262 Registered: January 2006
|
Senior Member |
|
|
But you've not cleared by one more doubt,on what basis Oracle recover only upto the last commit given whether is there any flag setting internally i.e, how oracle identifies difference between ordinary SCN value & a SCN value occurs at commit?
|
|
|
|
Re: Checkpoint [message #173923 is a reply to message #173594] |
Thu, 25 May 2006 04:46 |
JSI2001
Messages: 1016 Registered: March 2005 Location: Scotland
|
Senior Member |
|
|
Just to clarify what you are asking,
If there is a commit -- Chkpnt1
some more transactions are performed but not committed (I use the term transaction loosley here)
then, let's say a log switch -- chkpnt2
but there is a failure.
You envision that Oracle will somehow work out that it only needs to recover to chkpnt1.
Oracle will actually recover to chkpnt2, it's just that those uncommitted transactions will then be rolled back by smon once the db is open.
Jim
|
|
|
|
Re: Checkpoint [message #174006 is a reply to message #173444] |
Thu, 25 May 2006 08:56 |
gajini
Messages: 262 Registered: January 2006
|
Senior Member |
|
|
Thanks JSI2001
Now i got clear idea about rollback & recovery process.But i've still more
doubts based on the example given by you,please clear it.
Both Chkpnt1 & Chkpnt2 will update the datafile header & control file
header,but datafile header & control file header contains the entry made by
Chkpnt2(since it's the latest one).Then,how oracle identifies that it'll
rollback to till Chkpnt1(which occurred due to commit)?where it'll get info
that it should rollback to Chkpnt1?Where the commit SCN value is recorded &
how it identifies that SCN value is assigned due to commit?
Please give answer for those questions,so that i'll have clear picture
about datafile,control file & redo log and recovery & rollback process.
|
|
|