Home » RDBMS Server » Server Administration » CKPT Information please
CKPT Information please [message #59750] Sun, 21 December 2003 09:42 Go to next message
scott
Messages: 73
Registered: September 1999
Member
Hi All,
This is got nothing to do with implementation or real world. It's rather a question of academic interest.

Oracle Docs say

An event called Checkpoint occurs when the Oracle background process DBWn writes the modified database buffers in the SGA including both COMMITTED and UNCOMMITTED data to the data files.

Can someone explain in detail the above statement. If DBWn starts writing both committed and uncommitted data to the data files how is integrity of data files maintained ?

Thanks

Scott
Re: CKPT Information please [message #59751 is a reply to message #59750] Sun, 21 December 2003 10:20 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
pasting information from a website...better explained here...
A Checkpoint is a database event which synchronizes the modifies data blocks in memory with the datafiles on disk. It offers Oracle the 
means for ensuring the consistency of data modified by transactions. The mechanism of writing modified blocks on disk in Oracle is not synchronized with the commit of the corresponding transactions. 

A checkpoint has two purposes: 
(1) to establish data consistency, and 
(2) enable faster database recovery. How is recovery faster?  Because all database changes up to the checkpoint have been recorded in the datafiles, making it unnecessary to apply redo log entries prior to the checkpoint. The checkpoint must ensure that all the modified 
buffers in the cache are really written to the corresponding datafiles to avoid the loss of data which may occur with a crash (instance or 
disk failure). 

Oracle writes the dirty buffers to disk only on certain conditions: 
	A shadow process must scan more than one-quarter of DB_BLOCK_BUFFER 
	Every three seconds 
	When a checkpoint is produced 
	A checkpoint is realized on five types of events: 
	At each switch of the redo log files 
	When the delay for LOG_CHECKPOINT_TIMEOUT is reached. 
	When the size in bytes corresponding to:	 (LOG_CHECKPOINT_INTERVAL* size of IO OS blocks)
	is written on the current redo log file. 
	Directly by the ALTER SYSTEM SWITCH LOGFILE command. 
	Directly with the ALTER SYSTEM CHECKPOINT command 

During a checkpoint the following occurs: 
	The database writer (DBWR) writes all modified database blocks in the buffer cache back to datafiles 
	Log writer (LGWR) updates both the controlfile and the datafiles to indicate when the last checkpoint occurred (SCN). 

Re: CKPT Information please [message #59753 is a reply to message #59751] Sun, 21 December 2003 15:33 Go to previous messageGo to next message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Mahesh,
it looks like the information from this website is outdated.
For eg) "Log writer (LGWR) updates both the controlfile and the datafiles to indicate when the last checkpoint occurred (SCN). "

is not true ever since CKPT process was made mandatory(since Oracle 8). CKPT does that. Further , in case of incremental checkpoints since 8.1 , only the controlfile is updated and not all the datafile headers.

-Thiru
Re: CKPT Information please [message #59754 is a reply to message #59750] Sun, 21 December 2003 15:36 Go to previous message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Also , see this posting -->

[Updated on: Fri, 18 February 2005 23:32]

Report message to a moderator

Previous Topic: Help Please! Full commandline sequence using sys as sysdba for export
Next Topic: SHUTDOWN ABORT questions
Goto Forum:
  


Current Time: Mon Jan 06 18:25:14 CST 2025