Home » RDBMS Server » Server Administration » Re: Difference between Checkpoint number and SCN
Re: Difference between Checkpoint number and SCN [message #51531] Tue, 28 May 2002 20:05
kwalther
Messages: 9
Registered: April 2002
Junior Member
The checkpoint process is when dirty buffers are written to disk. Check point information is written to both the data file header and the control file. A checkpoint is loosely referred to the moment when data is written to disk from the SGA buffers. There is no specific checkpoint number; but there is a System Change Number (SCN) that occurs when the checkpoint process occurs.

When the database is running normally, the System Change Number (SCN) is set to infinity in the controlfile. When the datafile is brought into read-only, brought off line or the checkpoint process is forced, the SCN of the datafile is copied into the control file, and the infinity is discarded.
Now both the controlfile and the datafile SCN numbers match. When the datafile is brought back on line, or opened from read-only, the SCN number on the datafile header is compared with the SCN number listed in the control file. If they match, then it opens without error, if they don't match, then you must issue a RECOVER DATABASE.
Henceforth, a RECOVER will use the redo log files in the proper sequence to recover changes made to the datafile and bring it back to the moment in time where the SCN in the control file matches the SCN in the datafile. Everything syncronizes to the control file in this example.
Redo log sequence numbers are recorded in the control file as you go, by the log writer process (LGWR). Each redo log file is tagged with a different sequence number to seperate old from new. The sequence numbers are also recorded in the controlfile and used to determine sequencial order of log files when they are used to RECOVER the database to a moment in time (or specific SCN). Remember, SCN is a number tagged on a committed transaction; Checkpoint is a process that refers to writing dirty buffers to disk.
Previous Topic: question
Next Topic: Oracle 7 Memory Leak ..
Goto Forum:
  


Current Time: Mon Sep 16 19:01:49 CDT 2024