Phase 1: Log initialization

During the first restart phase, Db2 attempts to locate the last log RBA that was written before termination. Logging continues at the subsequent RBA.

In phase 1:

  1. Db2 compares the high-level qualifier of the integrated catalog facility catalog name that is in the BSDS with the corresponding qualifier of the name in the current subsystem parameter module (DSNZPxxx).
    • If they are equal, processing continues with step 2.
    • If they are not equal, Db2 terminates with this message:
      DSNJ130I ICF CATALOG NAME IN BSDS
               DOES NOT AGREE WITH DSNZPARM.
               BSDS CATALOG NAME=aaaaa,
               DSNZPARM CATALOG NAME=bbbbb

      Without the check, the next Db2 session could conceivably update an entirely different catalog and set of table spaces. If the check fails, you probably have the wrong parameter module. Start Db2 with the command START DB2 PARM(module-name), and name the correct module.

  2. Db2 checks the consistency of the timestamps in the BSDS.
    • If both copies of the BSDS are current, Db2 tests whether the two timestamps are equal.
      • If they are equal, processing continues with step 3.
      • If they are not equal, Db2 issues message DSNJ120I and terminates. That can happen when the two copies of the BSDS are maintained on separate disk volumes (as recommended) and one of the volumes is restored while Db2 is stopped. Db2 detects the situation at restart.

        To recover, copy the BSDS with the latest timestamp to the BSDS on the restored volume. Also recover any active log data sets on the restored volume, by copying the dual copy of the active log data sets onto the restored volume.

    • If one copy of the BSDS was deallocated, and logging continued with a single BSDS, a problem could arise. If both copies of the BSDS are maintained on a single volume, and the volume was restored, or if both BSDS copies were restored separately, Db2 might not detect the restoration. In that case, log records that are not noted in the BSDS would be unknown to the system.
  3. Db2 finds in the BSDS the log RBA of the last log record that was written before termination.
    The highest RBA field (as shown in the output of the print log map utility) is updated only when the following events occur:
    • When Db2 is stopped normally (STOP DB2).
    • When active log writing is switched from one data set to another.
    • When Db2 has reached the end of the log output buffer. The size of this buffer is determined by the OUTPUT BUFFER field of installation panel DSNTIPL.
  4. Db2 scans the log forward, beginning at the log RBA of the most recent log record, up to the last control interval (CI) that was written before termination.
  5. Db2 prepares to continue writing log records at the next CI on the log.
  6. Db2 issues message DSNJ099I, which identifies the log RBA at which logging continues for the current Db2 session. That message signals the end of the log initialization phase of restart.