No question at this time
The DBA-Village forum
as RSS feed
Site StatisticsEver registered users | 48336 | Total active users | 1567 | Act. users last 24h | 2 | Act. users last hour | 0 | Registered user hits last week | 225 | Registered user hits last month | 1036 |
|
Go up
checkpoint and SCN
Message |
Score |
Author |
Date |
Hi experts,
I have some doubts regarding SCN an...... |
|
akshay rai |
Apr 21, 2017, 14:59 |
Dear Akshay,
please check following link, you m...... |
|
Mirza Hidayathullah Baig |
Apr 21, 2017, 18:44 |
https://community.oracle.com/thread/886580
...... |
     |
Mirza Hidayathullah Baig |
Apr 21, 2017, 18:54 |
CKPT first asks DBWR to write the blocks into th...... |
     |
Michel Cadot |
Apr 21, 2017, 18:55 |
Agree with Michel..
BR
Mirza... |
|
Mirza Hidayathullah Baig |
Apr 21, 2017, 19:39 |
Hi Sir,
Thanks a lot for that clarification.
...... |
|
akshay rai |
Apr 24, 2017, 11:01 |
The log switch does not happen until the checkpo...... |
     |
Michel Cadot |
Apr 24, 2017, 17:47 |
Thank you for explaining it in such a detailed man...... |
|
akshay rai |
Apr 24, 2017, 17:54 |
It is a pleasure to see someone trying to unders...... |
|
Michel Cadot |
Apr 24, 2017, 18:28 |
Subject: |
checkpoint and SCN |
Author: |
akshay rai, India |
Date: |
Apr 21, 2017, 14:59, 666 days ago |
Message: |
Hi experts,
I have some doubts regarding SCN and checkpoints and how exactly these work.
"The checkpoint process (CKPT) updates the control file and data file headers with checkpoint information and signals DBWn to write blocks to disk. Checkpoint information includes the checkpoint position, SCN, location in online redo log to begin recovery, and so on"
now in the above statement which i copied from oracle doc, what happens first. Does it update the datafile headers first or waits for the DBwr to complete writing the necessary data and then updates the header?
Would be kind if someone could explain this with some example SCN numbers and scenario
thanks in advance
|
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
Mirza Hidayathullah Baig, United Kingdom |
Date: |
Apr 21, 2017, 18:44, 666 days ago |
Message: |
Dear Akshay,
please check following link, you may get some idea about scn and checkpoint
https://mgrvinod.wordpress.com/2011/03/14/scn-and-checkpoint/
Regards
Mirza |
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
Mirza Hidayathullah Baig, United Kingdom |
Date: |
Apr 21, 2017, 18:54, 666 days ago |
Score: |
       |
Message: |
https://community.oracle.com/thread/886580
Regards
Mirza |
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
Michel Cadot, France |
Date: |
Apr 21, 2017, 18:55, 666 days ago |
Score: |
       |
Message: |
CKPT first asks DBWR to write the blocks into the disk (at least) up to a SCN, then it updates the data file headers and control files.
Regards
Michel
|
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
Mirza Hidayathullah Baig, United Kingdom |
Date: |
Apr 21, 2017, 19:39, 666 days ago |
Message: |
Agree with Michel..
BR
Mirza |
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
akshay rai, India |
Date: |
Apr 24, 2017, 11:01, 663 days ago |
Message: |
Hi Sir,
Thanks a lot for that clarification.
Could you please help me with the scenario given below,
Suppose there is lot of committed data in the data buffer.
Now if there is log switch, Checkpoint will occur. And hence all the committed data will be flushed to the datablocks. Suppose the instance crashes midway. Now some of the committed data has been flushed to the data blocks.
Now during instance recovery, since log switch had taken place, the current redo log will not have the data regarding those committed data (It will be in the active log) . As we know SMON will use Current redo logs for recovery.. How will be the data recovered in this case.?
Thanks in advance |
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
Michel Cadot, France |
Date: |
Apr 24, 2017, 17:47, 663 days ago |
Score: |
       |
Message: |
The log switch does not happen until the checkpoint is terminated.
The plan is the following one:
- When a process needs a log switch (for instance, it needs to allocate some log buffer space and there is not enough free space in the current log file), it notifies LGWR
- LGWR starts a control file transaction to update the current log file entry and takes the redo locks to prevent for anyone generating redo data
- LGWR flushes the log buffer into the current log file
- LGWR notifies DBWR to checkpoint if necessary
- LGWR notifies ARC to archive the current log file
- LGWR waits for DBWR to end the checkpoint and ARC to end the archiving
- LGWR updates the current log file entry, chooses the next log file, clears and updates its entry in the control file
- LGWR ends the control file transaction and releases redo locks.
(Some of the steps are parallelized or not depending on the hardware and instance configuration, and it is possible some updates are not exactly at the same place depending on Oracle version.)
It does not matter the instance crashes in the middle of the checkpoint, the instance recovery applies in the same way (see you previous thread) except that it starts with end of the log switch.
Regards
Michel
|
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
akshay rai, India |
Date: |
Apr 24, 2017, 17:54, 663 days ago |
Message: |
Thank you for explaining it in such a detailed manner.
That clears my doubt.. thanks again |
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
Subject: |
Re: checkpoint and SCN |
Author: |
Michel Cadot, France |
Date: |
Apr 24, 2017, 18:28, 663 days ago |
Message: |
It is a pleasure to see someone trying to understand how it works (and may fail).
Regards
Michel
|
Your rating?: |
This reply is Good Excellent |
Goto: |
Reply - Top of page |
If you think this item violates copyrights, please click here
|