Even if you do not have an established quiesce point, you
can back out incorrect changes that your application made. Be aware,
however, that if you use this procedure, you lose any updates to the
database that occurred after the last checkpoint and before the application
error occurred.
Procedure
To back out the incorrect changes:
- Run the DSN1LOGP stand-alone utility on the log scope that
is available at Db2 restart,
using the SUMMARY(ONLY) option.
- Determine the RBA of the most recent checkpoint before
the first bad update occurred, from one of the following sources:
- Message DSNR003I on the operator's console,
which looks similar to this message:
DSNR003I RESTART ..... PRIOR CHECKPOINT RBA=000007425468
The
required RBA in this example is X'7425468'.
This technique
works only if no checkpoints have been taken since the application
introduced the bad updates.
- Output from the print log map utility. You must know the time
that the first bad update occurred. Find the last BEGIN
CHECKPOINT RBA before that time.
- Run DSN1LOGP again, using SUMMARY(ONLY), and specify the
checkpoint RBA as the value of RBASTART.
The output
lists the work in the recovery log, including information about the
most recent complete checkpoint, a summary of all processing, and
an identification of the databases that are affected by each active
user.
- Find the unit of recovery in which the error was made.
One of the messages in the output (identified as DSN1151I or DSN1162I)
describes the unit of recovery in which the error was made. To find
the unit of recovery, use your knowledge of the time that the program
was run (START DATE= and TIME=), the connection ID (CONNID=), authorization
ID (AUTHID=), and plan name (PLAN=). In that message, find the starting
RBA as the value of START=.
- Run the Db2 RECOVER
utility with the TOLOGPOINT option, and specify the starting RBA that
you found in the previous step.
- Recover any related table spaces or indexes to the same
point in time.