Failure during log initialization phase

When a failure occurs during the log initialization phase, certain characteristics of the situation are evident.

The following figure illustrates the timeline of events that exist when a failure occurs during the log initialization phase.
Figure 1. Failure during log initialization
Begin figure description. This figure is a time line that depicts events that occur during a log initialization failure. End figure description.

The portion of the log between log RBAs X and Y is inaccessible. For failures that occur during the log initialization phase, the following activities occur:

  1. Db2 allocates and opens each active log data set that is not in a stopped state.
  2. Db2 reads the log until the last log record is located.
  3. During this process, a problem with the log is encountered, preventing Db2 from locating the end of the log. Db2 terminates and issues an abend reason code. Some of the abend reason codes that might be issued include:
    • 00D10261
    • 00D10262
    • 00D10263
    • 00D10264
    • 00D10265
    • 00D10266
    • 00D10267
    • 00D10268
    • 00D10329
    • 00D1032A
    • 00D1032B
    • 00D1032C
    • 00E80084

During its operations, Db2 periodically records in the BSDS the RBA of the last log record that was written. This value is displayed in the print log map report as follows:

HIGHEST RBA WRITTEN:    00000742989E

Because this field is updated frequently in the BSDS, the highest RBA written can be interpreted as an approximation of the end of the log. The field is updated in the BSDS when any one of a variety of internal events occurs. In the absence of these internal events, the field is updated each time a complete cycle of log buffers is written. A complete cycle of log buffers occurs when the number of log buffers that are written equals the value of the OUTPUT BUFFER field of installation panel DSNTIPL. The value in the BSDS is, therefore, relatively close to the end of the log.

To find the actual end of the log at restart, Db2 reads the log forward sequentially, starting at the log RBA that approximates the end of the log and continuing until the actual end of the log is located.

Because the end of the log is inaccessible in this case, some information is lost:

  • Units of recovery might have successfully committed or modified additional page sets past point X.
  • Additional data might have been written, including those that are identified with writes that are pending in the accessible portion of the log.
  • New units of recovery might have been created, and these might have modified data.

Because of the log error, Db2 cannot perceive these events.

A restart of Db2 in this situation requires truncation of the log.