alternative site recovery, alternative site, recovery" /> Recovering a queue-sharing group at the alternative site

 

Recovering a queue-sharing group at the alternative site

Before we can recover the queue-sharing group, we need to prepare the environment:

  1. If you have old information in your Coupling Facility from practice startups when you installed the queue-sharing group, we need to clean this out first (if you do not have old information in the Coupling Facility, we can omit this step:

    1. Enter the following z/OS command to display the CF structures for this queue-sharing group:

      D XCF,STRUCTURE,STRNAME=qsgname

    2. For all structures that start with the queue-sharing group name, use the z/OS command SETXCF FORCE CONNECTION to force the connection off those structures:

      SETXCF FORCE,CONNECTION,STRNAME=strname,CONNAME=ALL

    3. Delete all the CF structures using the following command for each structure:

      SETXCF FORCE,STRUCTURE,STRNAME=strname

  2. Restore DB2 systems and data-sharing groups

  3. Recover the CSQ.ADMIN_B_STRBACKUP table so that it contains information about the most recent structure backups taken at the prime site

Note:
It is important that the STRBACKUP table contains the most recent structure backup information. Older structure backup information might require data sets that you have discarded as a result of the information given by a recent DISPLAY USAGE TYPE(DATASET) command, which would mean that your recovered CF structure would not contain accurate information.

To recover the queue managers in the queue-sharing group:

  1. Define new page set data sets and load them with the data in the copies of the page sets from the primary site.

  2. Define new active log data sets.

  3. Define a new BSDS data set and use Access Method Services REPRO to copy the most recent archived BSDS into it.

  4. Use the print log map utility CSQJU004 to print information from this most recent BSDS. At the time this BSDS was archived, the most recent archived log you have would have just been truncated as an active log, and does not appear as an archived log. Record the STARTRBA, STARTLRSN, ENDRBA, and ENDLRSN values of this log.

  5. Use the change log inventory utility, CSQJU003, to register this latest archive log data set in the BSDS that you have just restored, using the values recorded in Step 4.

  6. Use the DELETE option of CSQJU003 to remove all active log information from the BSDS.

  7. Use the NEWLOG option of CSQJU003 to add active logs to the BSDS, do not specify STARTRBA or ENDRBA.

  8. Calculate the recoverylrsn for the queue-sharing group. The recoverylrsn is the lowest of the ENDLRSNs across all queue managers in the queue-sharing group (as recorded in Step 4), minus 1. For example, if there are two queue managers in the queue-sharing group, and the ENDLRSN for one of them is B713 3C72 22C5, and for the other is B713 3D45 2123, the recoverylrsn is B713 3C72 22C4.

  9. Use CSQJU003 to add a restart control record to the BSDS. Specify:

    CRESTART CREATE,ENDLRSN=recoverylrsn
    where recoverylrsn is the value you recorded in Step 8.

    The BSDS now describes all active logs as being empty, all the archived logs you have available, and no checkpoints beyond the end of your logs.

    You must add the CRESTART record to the BSDS for each queue manager within the queue-sharing group.

  10. Restart each queue manager in the queue-sharing group with the usual START QMGR command. During initialization, an operator reply message such as the following is issued:

    CSQJ245D +CSQ1 RESTART CONTROL INDICATES TRUNCATION AT RBA highrba.
             REPLY Y TO CONTINUE, N TO CANCEL

    Reply

    Y to start the queue manager. The queue manager starts, and recovers data up to ENDRBA specified in the CRESTART statement.

  11. Once all the queue managers are active, issue a RECOVER CFSTRUCT command for each CF application structure.

    If you issue the RECOVER CFSTRUCT command for all structures on a single queue manager, the log merge process is only performed once, so is quicker than issuing the command on a different queue manager for each CF structure, where each queue manager has to perform the log merge step.