Oracle Log Switches and Checkpoints

When a redo log file fills up it switches to the next file. This is called a log switch.

The log switch always causes a checkpoint to occur. This flushes all dirty buffers from the log cache. (writes modified data to disk)

If archiving is on, the old log file id archived.

The new log file is given a log sequence number which is also given to the archived log file.

 

Controlint the checkpoint

LOG_CHECKPOINT_INTERVAL

set to the number of operating system blocks that can be used before a checkpoint occurs.

LOG_CHECKPOINTS_TO_ALERT

Writes a message to the alert log when a checkpoint occurs.

This can take up a lot of space!

LOG_CHECKPOINT_TIMEOUT

Set the time in seconds bertween checkpoints

 

Force a checkpoint

ALTER SYSTEM CHECKPOINT

You may do this if there is a risk of the system failing.

 

Force a log switch

ALTER SYSTEM SWITCH LOGFILE;

you will rarely need to do this.

Leave a Comment