Recovering the catalog and directory to a point in time before a CATMAINT or a function level upgrade in a data sharing environment

If you are in a data sharing environment, and you need to recover the catalog and directory to a point in time before CATMAINT was run or a function level upgrade was performed, you need to follow a special procedure.

Procedure

  1. Create image copies of the Db2 catalog and directory.
  2. Determine the point in time to which you need to recover, which is called xxxxxxxx in this procedure.
  3. Start of changeRun the following DIAGNOSE utility control statement to clear the catalog and function level information from an internal control structure:
    DIAGNOSE TYPE(0) REPAIR SET DBID(8) PSID(0000) RESET
    Important: This control statement should be issued only as part of this procedure. DBID(8) identifies an internal control structure for system database information. It is not a Db2 catalog database or any physical database provided by Db2.
    End of change
  4. Start of changeStop all members of the data sharing group, and issue the following SETXCF FORCE command to delete the coupling facility structures for the data sharing group:
    SETXCF FORCE,STRUCTURE,STRNAME=XXXX_SCA(sca-structure-name)
    End of change
  5. If xxxxxxxx is prior to execution of the CATMAINT utility or activation of a function level, restore the BSDS from the most recent archived copy of the BSDS after LRSN xxxxxxxx, and before the CATMAINT or function level activation occurred. If that is not possible, take these actions:
    • Restore the most recent BSDS prior to xxxxxxxx.
    • Run DSNJU003 to update the archive log and active log information to include logs up to xxxxxxxx.
  6. Create a conditional restart control record (CRCR) with an ENDLRSN value of xxxxxxxx.
  7. For one member of the data sharing group, set the DEFER and ALL subsystem parameters, and start Db2 on that member with ACCESS(MAINT).
  8. Recover the catalog and directory table spaces without the TOLOGPOINT option in the RECOVER utility control statements. Rebuild the catalog and directory indexes with the REBUILD INDEX utility.
    This step recovers the catalog and directory table spaces to the log truncation point of xxxxxxxx.
  9. Recover all user objects.
    This step keeps the definitions of user objects synchronized with the information on those objects in the catalog or directory after CATMAINT was run or a function level upgrade was performed.
  10. Stop Db2 on the data sharing member on which you previously started Db2.
  11. Set the RESTART subsystem parameter, and start Db2 without the ACCESS(MAINT) option on the data sharing member on which you stopped Db2 in the previous step.
  12. Start Db2 on the other members of the data sharing group.