No question at this time
DBA Top 10
1 M. Cadot 20600
2 A. Kavsek 14800
3 M. Hidayathullah ... 10500
4 B. Vroman 8100
5 P. Wisse 5300
6 T. Boles 4200
7 J. Schnackenberg 3800
8 K. Van Nieuwenhov... 2100
9 G. Van Cauter 1400
10 K. Pagadala 1100
About
DBA-Village
Download PLATO
The free tool for auditing and tuning your database
Version 55 now available
Sep 02, 2016
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48057
Total active users1738
Act. users last 24h12
Act. users last hour0
Registered user hits last week391
Registered user hits last month1277
Go up

checkpoint and SCN
Next thread: Fetching Recording of between Dates
Prev thread: data load slow

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 ...... Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts Mirza Hidayathullah Baig Apr 21, 2017, 18:54
CKPT first asks DBWR to write the blocks into th...... Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts 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...... Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts 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

Follow up by mail Click here


Subject: checkpoint and SCN
Author: akshay rai, India
Date: Apr 21, 2017, 14:59, 181 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, 180 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, 180 days ago
Score:   Score: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 PtsScore: 100 Pts
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, 180 days ago
Score:   Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts
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, 180 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, 178 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, 177 days ago
Score:   Score: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 PtsScore: 200 Pts
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, 177 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, 177 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