Establishing a recovery cycle by using RESTORE SYSTEM LOGONLY
Each time that you restore the logs and the BSDS from the primary site at your tracker site, you establish a new recovery cycle. One way to establish a recovery cycle is to use the RESTORE SYSTEM utility with the LOGONLY option.
Before you begin
About this task
Using the LOGONLY option of the RESTORE SYSTEM utility enables you to periodically apply the active log, archive logs, and the BSDS from the primary site at the tracker site.
Procedure
To establish a recovery cycle at your tracker site by using the RESTORE SYSTEM utility:
- While your primary site continues its usual workload, send
a copy of the primary site active log, archive logs, and BSDS to the
tracker site. Send full image copies for the following objects:
- Table spaces or partitions that are reorganized, loaded, or repaired with the LOG NO option after the latest recovery cycle
- Objects that, after the latest recovery cycle, have been recovered to a point in time
Recommendation: If you are taking incremental image copies, run the MERGECOPY utility at the primary site before sending the copy to the tracker site. - At the tracker site, restore the BSDS that was received
from the primary site by following these steps:
- Locate the BSDS in the latest archive log that is now at the tracker site.
- Register this archive log in the archive log inventory of the new BSDS by using the change log inventory utility (DSNJU003).
- Register the primary site active log in the new BSDS by using the change log inventory utility (DSNJU003).
- Use the change log inventory utility (DSNJU003) with the
following CRESTART control statement:
CRESTART CREATE,ENDRBA=nnnnnnnnn000, FORWARD=NO,BACKOUT=NOIn this control statement, nnnnnnnnn equals the RBA at which the latest archive log record ends +1. Do not specify the RBA at which the archive log begins because you cannot cold start or skip logs in tracker mode.- Data sharing
- If you are recovering a data sharing group, you must use the following
CRESTART control statement on all members of the data sharing group.
The ENDLRSN value must be the same for all members.
CRESTART CREATE,ENDLRSN=nnnnnnnnnnnn,FORWARD=NO,BACKOUT=NOIn this control statement, nnnnnnnnnnnn is the lowest LRSN of all the members that are to be read during restart. Specify one of the following values for the ENDLRSN:
- If you receive the ENDLRSN from the output of the print log map utility (DSNJU004) or from the console logs using message DSNJ003I, you must use ENDLRSN -1 as the input to the conditional restart.
- If you receive the ENDLRSN from the output of the DSN1LOGP utility (message DSN1213I), you can use the displayed value.
The ENDLRSN or ENDRBA value indicates the end log point for data recovery and for truncating the archive log. With ENDLRSN, the missing log records between the lowest and highest ENDLRSN values for all the members are applied during the next recovery cycle.
- If the tracker site is a data sharing group, delete all Db2 coupling facility structures before restarting the tracker members.
- If you used the DSN1COPY utility to create a copy of SYSUTILX
during the last tracker cycle, restore this copy with DSN1COPY.
- Data sharing
- For data sharing, restart every member of the data sharing group.
- At the tracker site, stop and start Db2 to begin a tracker site recovery cycle.
- At the tracker site, run the RESTORE SYSTEM utility with the LOGONLY option to apply the logs (both archive and active) to the data at the tracker site.
- If the RESTORE SYSTEM utility issues a return code of 4, use the
DSN1COPY utility to make a copy of SYSUTILX and of indexes that are associated with SYSUTILX before
you recover or rebuild those objects. DSN1COPY issues a return code of 4 if application of the log results in one or more Db2 objects being marked as RECP or RBDP.
If you are performing this procedure on a tracker site
because you migrated the production site to Db2 11 conversion mode, converted the production
site to Db2 11 enabling-new-function mode
or new-function mode, or reverted the production site from Db2 11 new-function mode to conversion mode*, and
the RESTORE SYSTEM utility leaves directory table spaces DSNDB01.DBD01 and DSNDB01.SYSDBDXA in
RECOVER-pending status, perform these sub-steps. Otherwise, continue the procedure with step 10. - Stop and start Db2 at the tracker site.
- Run the RECOVER utility on DSNDB01.DBD01 and DSNDB01.SYSDBDXA.
- Run the REBUILD INDEX utility to rebuild the indexes on tables in DSNDB01.DBD01 and DSNDB01.SYSDBDXA.

- Stop and start Db2 at the tracker site.
- Issue the DISPLAY DATABASE RESTRICT command
to display objects that are marked RECP, RBDP, or LPL and to identify
which objects are in a utility progress state (such as UTUT or UTRO).
Run the RECOVER or REBUILD INDEX utility on these objects, or record
which objects are in an exception state so that you can recover them
at a later time. The exception states of these objects are not retained in the next recovery cycle.
- After all recovery activity complete at the tracker site, shut down the Db2 tracker site.
- Optional: Stop and start the Db2 tracker site several times before completing a recovery cycle.