Checkpoint log records

Db2 takes periodic checkpoints during normal operation in order to reduce restart time.

Begin program-specific programming interface information.Db2 takes checkpoints in the following circumstances:

  • When a predefined number of log records have been written or a predetermined amount of time in minutes has elapsed.

    This number is defined by field CHECKPOINT FREQ on installation panel DSNTIPL.

  • When switching from one active log data set to another
  • At the end of a successful restart
  • At normal termination

At a checkpoint, Db2 logs its current status and registers the log RBA of the checkpoint in the bootstrap data set (BSDS). At restart, Db2 uses the information in the checkpoint records to reconstruct its state when it terminated.

Many log records can be written for a single checkpoint. Db2 can write one to begin the checkpoint; others can then be written, followed by a record to end the checkpoint. The following table summarizes the information logged.

Table 1. Contents of checkpoint log records
Type of log record Information logged
Begin_Checkpoint Marks the start of the summary information. All later records in the checkpoint have type X'0100' (in the LRH).
Unit of Recovery Summary Identifies an incomplete unit of recovery (by the log RBA of the Begin_UR log record). Includes the date and time of its creation, its connection ID, correlation ID, authorization ID, the plan name it used, and its current state (inflight, indoubt, in-commit, or in-abort).
Page Set Summary Contains information for allocating and opening objects at restart, and identifies (by the log RBA) the earliest checkpoint interval containing log records about data changes that have not been applied to the DASD version of the data or index. There is one record for each open page set (table space or index space).
Page Set Exception Summary Identifies the type of exception state. There is one record for each database and page set with an exception state.
Page Set UR Summary Record Identifies page sets modified by any active UR (inflight, in-abort, or in-commit) at the time of the checkpoint.
End_Checkpoint Marks the end of the summary information about a checkpoint.

End program-specific programming interface information.