CHECKPOINT

 

Purpose

Forces the system to take a checkpoint.

Syntax

IMG00026.gif

Description

The CHECKPOINT command forces DBMaker to take a checkpoint. Take a checkpoint if a database activity is very high and you infrequently back up or restart the database. Only a DBA or SYSADM may execute the CHECKPOINT command.

A checkpoint event brings the database to a clean state. DBMaker writes all Journal records and all dirty data pages in memory buffers to disk, and reclaims Journal blocks that are no longer required for backup or recovery purposes. DBMaker can reclaim Journal blocks that contain non-active transactions completed before the start of the oldest active transaction.

Startup time after an instance failure is reduced after taking a checkpoint. DBMaker writes the time of the last checkpoint and a list of all transactions active at the time of the checkpoint to the Journal file header. During database recovery, DBMaker uses this information to determine which transactions should be undone, redone, and ignored.

DBMaker automatically takes a checkpoint when a database starts or terminates when performing an online backup, or when the Journal is full. This may require a significant amount of time to complete, depending on the size and number of transactions since the last checkpoint. Any transactions that are active when an automatic checkpoint occurs must wait until the checkpoint operation completes. DBMaker will also abort the current transaction if the Journal is full and issuing a checkpoint cannot reclaim enough Journal space to complete the transaction. In this situation, redo all commands in the aborted transaction.

To avoid any unnecessary delays in transaction processing, periodically take manual checkpoints using the CHECKPOINT command. Periodic manual checkpoints reduce the amount of time required to start, terminate, and back up a database, time transactions wait for checkpoint operations to complete, and the possibility of a full Journal. The optimal time interval between manual checkpoints depends on the activity frequency in the database.