Bypassing backout before restarting
A portion of the log becomes inaccessible when a failure occurs during backward log recovery. Operations management can recover from this situation by starting Db2 in a certain way, and then identifying the page sets that are inconsistent because of the incomplete units of recovery.
Procedure
To bypass backout before recovery:
- Determine the units of recovery that cannot be backed out
and the page sets that will be inconsistent after the completion of
restart.
- Determine the location of the latest checkpoint on the
log by looking at one of the following sources, whichever is more
convenient:
- The operator's console contains message DSNR003I,
which identifies the location of the start of the last checkpoint
on the log at log RBA X'7425468'.
DSNR003I RESTART ... PRIOR CHECKPOINT RBA=00007425468 - The print log map utility output identifies the last checkpoint, including its BEGIN CHECKPOINT RBA.
- The operator's console contains message DSNR003I,
which identifies the location of the start of the last checkpoint
on the log at log RBA X'7425468'.
- Obtain a report of the outstanding work that is to be
completed at the next Db2 restart
by running the DSN1LOGP. When you run DSN1LOGP, specify the checkpoint RBA as the RBASTART and the SUMMARY(ONLY) option. Include the last complete checkpoint in the execution of DSN1LOGP in order to obtain complete information.
Analyze the output of the DSN1LOGP utility. The summary report that is placed in the SYSSUMRY file contains two sections of information. The heading of first section of the output is the following message:
DSN1150I SUMMARY OF COMPLETED EVENTSThat message is followed by other messages that identify completed events, such as completed units of recovery. That section of the output does not apply to this procedure.
The heading of the second section of the output is the following message:DSN1157I RESTART SUMMARYThat message is followed by others that identify units of recovery that are not yet completed and the page sets that they modified. After the summary of outstanding units of recovery is a summary of page sets with database writes that are pending.
The restart processing that failed was able to complete all units of recovery processing within the accessible scope of the log after point Y. Database writes for these units of recovery are completed during the forward recovery phase of restart on the next restart. Therefore, do not bypass the forward recovery phase. All units of recovery that can be backed out have been backed out.
All remaining units of recovery that are to be backed out (DISP=INFLIGHT or DISP=IN-ABORT) are bypassed on the next restart because their STARTRBA values are less than the RBA of point Y. Therefore, all page sets that were modified by those units of recovery are inconsistent after restart. This means that some changes to data might not be backed out. At this point, you only need to identify the page sets in preparation for restart.
- Determine the location of the latest checkpoint on the
log by looking at one of the following sources, whichever is more
convenient:
- Use the change log inventory utility to create a conditional
restart control record (CRCR) in the BSDS, and direct restart to bypass
backward recovery processing during the subsequent restart by using
the BACKOUT specification. At restart, all units of recovery that require backout are declared complete by Db2, and log records are generated to note the end of the unit of recovery.The change log inventory utility control statement is:
CRESTART CREATE,BACKOUT=NO - Start Db2.
At the end of restart, the CRCR is marked
Deactivated
to prevent its use on a subsequent restart. Until the restart is complete, the CRCR is in effect. Use START DB2 ACCESS(MAINT) until data is consistent or page sets are stopped. - Resolve all inconsistent data problems. After the successful start of Db2, resolve all data inconsistency problems. Resolving inconsistencies resulting from a conditional restart describes how to do this. At this time, make all other data available for use.