The RECOVER TOLOGPOINT option in a data sharing system
You can use the RECOVER utility with the TOLOGPOINT option to recover a data sharing Db2 subsystem.
The following figure shows a data sharing system with three Db2 members (A, B, and C). Table space TS1 and TS2 are being recovered to time TR using the RECOVER TOLOGPOINT option, they are listed in the same RECOVER job. UR1 was inflight at TR time running on member A, its start time was T1, at time T2 it updated TS1, and at time T3 it updated TS2, T2 is earlier than T3. UR2 was aborting at TR time running on member C, its start time was T4 and at time T5 it updated TS2. There was no active UR on member B at time TR.
RECOVER utility job output messages
The RECOVER utility takes the following actions and provides the following messages during recovery in a data sharing system.
- LOGCSR phase
- After the RECOVER LOGAPPLY phase, the RECOVER utility
enters the log analysis phase, known as the LOGCSR phase. The following
messages are issued during this phase:
- DSNU1550I
- Indicates the start of log analysis on member A.
- DSNU1551I
- Indicates the end of log analysis on member A.
- DSNU1550I
- Indicates the start of log analysis on member C.
- DSNU1551I
- Indicates the end of log analysis on member C.
- DSNU1552I
- Indicates the end of LOGCSR phase of RECOVER utility.
- DSNU1553I
- Issued after the end of the LOGCSR phase. The following information
is shown in the message:
- UR1 on member A modified TS1 at T2 time.
- UR1 on member A modified TS2 at T3 time.
- UR2 on member C modified TS2 at T5 time.
- LOGUNDO phase
- The RECOVER utility enters the LOGUNDO phase. The following messages
are issued during this phase:
- DSNU1554I
- Indicates the start of backout for member A.
- Backout is performed on TS2 and TS1 and log records are read from time TR to T2.
- There maybe one or more DSNU1555I messages showing the backout progress for member A.
- DSNU1556I
- Indicates the end of backout on member A.
- DSNU1554I
- Indicates the start of backout on member C.
- Backout is performed on TS2 and log records are read from time TR to T5.
- There may be one or more DSNU1555I messages showing the backout progress for member C.
- DSNU1556I
- Indicates the end of backout for member C.
- DSNU1557I
- Indicates the end of the LOGUNDO phase of the RECOVER utility.
A special type of compensation log record will be written during the LOGUNDO phase of log apply, known as the pseudo compensation log record in the following context. For each undo log record applied during the LOGUNDO phase, there will be one pseudo compensation log record written for it. This is a REDO-only log record and not units of recovery (UR) related. It will only be used for future log apply in the case that you first recover objects to a point in time with consistency and then recover the same objects again to currency using the same image copy used by previous recover job.
This type of log record will be skipped by Db2 restart and the RESTORE SYSTEM utility LOGAPPLY. This type of log record will always be written to the active log data sets of the Db2 member that is running the RECOVER job, although it may compensate the log record which was originally from another Db2 member. The member ID part of this log record will always store the ID of the Db2 member that is running the RECOVER job.
During the LOGUNDO phase, if either of the following conditions exist:
- Applying the log record to a data page causes the data on the page logically inconsistent.
- The UNDO log record has already been applied and the page is now physically inconsistent.
The page is flagged as broken and the pseudo compensation log record of the log record that is being backed out is written to the active log data set. All of the subsequent log apply processes on this data page are skipped, but the pseudo compensation log records of the skipped log records are written to the active log data set. The log apply process continues for other pages in the same table space and for other objects in the recover list. For each error that is encountered, a DSNI012I message is issued. At the end, the RECOVER utility completes with return code 8.
If an error occurs on the index during the LOGUNDO phase, the entire index is marked as REBUILD-pending (RBDP) and no further log is applied on this index. You have to rebuild this index after the RECOVER utility completes with return code 8.
- UTILTERM phase
- The RECOVER utility enters the UTILTERM phase, which is an existing phase of the RECOVER utility.