Overview of Checkpoints Flashcards
Overview of Checkpoints
+ Checkpoint is a crucial mechanism in instance db shutdowns, instance recovery and Oracle db operations generally
+ Datastructures that indicate the checkpoint position, which is the SCN in the redo stream where instance recovery must begin
+ The checkpoint position is determined by the oldest dirty buffer in the db buffer cache.
+ The checkpoint position acts as a pointer to the redo stream and is stored in the control file and in each data file header.
+ The writing of modified db buffers in the db buffer cache to disk
Purpose of Checkpoints
+ Reduce the time required for recovery in case of an instance or media failure
+ Ensured regular db writes of dirty buffers to disk
+ Ensures the db writes all committed data to disk during a consistent shutdown
When Oracle Database Initiates Checkpoints
The CKPT is responsible for writing checkpoints to the data file headers and control file. Checkpoints occur in the situations: \+ Thread checkpoints \+ Tablespace and data file checkpoints \+ Incremental checkpoints
Thread checkpoints
Thread checkpoints - db writes to disk all buffers modified by redo in a specific thread before a certain target. \+ Consistent db shutdown \+ ALTER SYSTEM CHECKPOINT statement \+ Online red log switch \+ ALTER DATABASE BEGIN BACKUP statement
Tablespace and data file checkpoints
Tablespace and data file checkpoints
+ The db writes to disk all buffers modified by redo before a specific target.
+ A tablespace checkpoint is a set of datafile checkpoints, one for each data file in the tablespace.
+ These chekpoints occur in a variety of situations, including making a tablespace read-only or taking it offline normal, shrinking a data file, or executing ALTER TABLESPACE BEGIN BACKUP
Incremental checkpoints
Incremental checkpoints
+ Is a thread checkpoint partly intented to avoid writing large number of blocks at the online redo log switch.