The RECOVER TOLOGPOINT option in a non-data sharing system

You can use the RECOVER utility with the TOLOGPOINT option to recover a non-data sharing Db2 subsystem.

Figure 1 shows a non-data sharing system. Table spaces TS1 and TS2 are being recovered to time TR using the RECOVER TORBA option. TS1 and TS2 are listed in the same RECOVER job. UR1 was inflight at TR time, the 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, the start time was T4, and at time T5 it updated TS2.

Figure 1. Using the RECOVER TOLOGPOINT option in a non-data sharing system
Begin figure description. Figure described in preceding paragraph. End figure description.

RECOVER utility job output messages

The RECOVER utility takes the following actions and provides the following messages during recovery in a non-data sharing system.

LOGCSR phase
After the 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.
DSNU1551I
Indicates the end of log analysis.
DSNU1552I
Indicates the end of the LOGCSR phase of the RECOVER utility.
DSNU1553I
Issued after the end of the LOGCSR phase. The following information is shown in the message:
  • UR1 modified TS1 at T2 time.
  • UR1 modified TS2 at T3 time.
  • UR2 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.
  • Backout is performed on TS2 and TS1 and log records are read from time TR to T2.
  • There may be one or more DSNU1555I messages showing the backout progress.
DSNU1556I
Indicates the end of backout.
DSNU1557I
Indicates the end of 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 datasets 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 dataset. 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 dataset. 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.