Phase 2: Current status rebuild
During the second restart phase, Db2 determines the statuses of objects at the time of termination. By the end of the phase, Db2 has determined whether any units of recovery were interrupted by the termination.
In phase 2:
- Db2 checks the BSDS to find the log RBA of the last complete checkpoint before termination.
- Db2 processes the RESTART or DEFER option of the parameter module of the START DB2 command if any exist. The default is always RESTART ALL.
- Db2 reads
every log record from that checkpoint up to the end of the log (which
was located during phase 1), and identifies:
- All exception conditions that exist for each database and all image copy information that is related to the DSNDB01.SYSUTILX, DSNDB01.DBD01, DSNDB06.SYSTSCPY, and DSNDB01.SYSDBDXA table spaces.
- All objects that are open at the time of termination.
- How far back in the log to go to reconstruct data pages that were not written to disk.
The number of log records that are written between one checkpoint and the next is set when Db2 is installed.
You can temporarily modify the checkpoint frequency by using the command SET LOG. The value that you specify persists while Db2 is active; on restart, Db2 uses the checkpoint type and frequency that is specified on installation panel DSNTIPL1.
- Db2 issues message DSNR004I, which summarizes the activity that is required at restart for outstanding units of recovery.
- Db2 issues message DSNR007I if any outstanding units of recovery are discovered. The message includes, for each outstanding unit of recovery, its connection type, connection ID, correlation ID, authorization ID, plan name, status, log RBA of the beginning of the unit of recovery (URID), and the date and time of its creation.
During phase 2, no database changes are made, nor are any units of recovery completed. Db2 determines what processing is required by phase 3, forward log recovery, before access to databases is allowed.