Recovering at a tracker site that uses the RECOVER utility

One way that you can make the tracker site be the takeover site is by using the RECOVER utility in the recovery cycles at your tracker site.

Procedure

To make the tracker site be the takeover site by using the RECOVER utility:

  1. Restore the BSDS, and register the archive log from the last archive log that you received from the primary site.
  2. For environments that do not use data sharing, continue with step 3.
    Data sharing
    If this is a data sharing system, delete the coupling facility structures.
  3. Ensure that the DEFER ALL and TRKSITE NO subsystem parameters are specified.
  4. Take the appropriate action, which depends on whether you received more logs from the primary site.
    If this is a non-data-sharing Db2 subsystem, the log truncation point varies depending on whether you have received more logs from the primary site since the last recovery cycle:
    • If you did not receive more logs from the primary site:

      Start Db2 using the same ENDRBA that you used on the last tracker cycle. Specify FORWARD=YES and BACKOUT=YES; this takes care of uncommitted work. If you have fully recovered the objects during the previous cycle, they are current except for any objects that had outstanding units of recovery during restart. Because the previous cycle specified NO for both FORWARD and BACKOUT and you have now specified YES, affected data sets are placed in the LPL. Restart the objects that are in LPL status by using the following command:

      START DATABASE(*) SPACENAM(*)

      After you issue the command, all table spaces and indexes that were previously recovered are now current. Remember to rebuild any indexes that were not recovered during the previous tracker cycle, including user-defined indexes on the Db2 catalog.

    • If you received more logs from the primary site:

      Start Db2 using the truncated RBA nnnnnnnnn000, which equals the value of the ENDRBA of the latest archive log plus 1. Specify FORWARD=YES and BACKOUT=YES. Run your recoveries as you did during recovery cycles.

    Data sharing
    You must restart every member of the data sharing group; use the following CRESTART statement:
     CRESTART CREATE,ENDLRSN=nnnnnnnnnnnn,FORWARD=YES,BACKOUT=YES

    In this statement, nnnnnnnnnnnn is the LRSN of the last log record that is to be used 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 message DSNJ003I at the console logs use ENDLRSN -1 as the input to the conditional restart.
    • If you receive the ENDLRSN from the output of the DSN1LOGP utility (DSN1213I message), 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.

    The takeover Db2 sites must specify conditional restart with a common ENDLRSN value to allow all remote members to logically truncate the logs at a consistent point.

  5. As described for a tracker recovery cycle, recover SYSUTILX from an image copy from the primary site, or from a previous DSN1COPY copy that was taken at the tracker site.
  6. Terminate any in-progress utilities by using the following procedure:
    1. Enter the command DISPLAY UTILITY(*).
    2. Run the DIAGNOSE utility with DISPLAY SYSUTIL to get the names of objects on which utilities are being run.
    3. Terminate in-progress utilities by using the command TERM UTILITY(*).
  7. Continue with your recoveries either with the LOGONLY option or with image copies. Remember to rebuild indexes, including IBM® and user-defined indexes on the Db2 catalog and user-defined indexes on table spaces.