Recovering catalog and directory objects

If you need to recover the catalog and directory, you must recover them before you recover user table spaces. Also, you must recover catalog and directory objects in a specific order.

Before you begin

Before you can recover catalog and directory objects, you must meet the following requirements:
  • Start of changeEnsure that you have applied APAR PI11316 and completed the ++HOLD actions.End of change
  • Recovering and rebuilding catalog and directory objects requires installation SYSADM or installation SYSOPR authority.
  • If you are performing a recovery at a remote site, start the remote DB2® for z/OS® subsystem with ACCESS(MAINT) specified on the START DB2 command and with DEFER ALL specified in the DSNZPARM load module. (See installation panels DSNTIPS and DSNTIPO3.) If DB2 is not started with ACCESS(MAINT), resource unavailable conditions on the real-time statistics (RTS) catalog indexes might occur during REBUILD INDEX(ALL) for the catalog and directory indexes.
  • If the logging environment requires adding or restoring active logs, restoring archive logs, or performing any action that affects the log inventory in the BSDS, you need to recover the BSDS before catalog and directory objects. To copy active log data sets, use the Access Method Services REPRO function.

A full recovery of the catalog and directory is recommended. However, if you need to do a point-time-recovery, be aware of the implications associated with doing point-in-time recovery of the catalog, directory, and user objects. See Point-in-time recovery of the catalog, directory, and all user objects.

Tip: Start of changeFor best results, check the consistency of the DB2 catalog and directory regularly, even outside of the migration process. For detailed instructions, see Verify the integrity of DB2 table spaces and Check for consistency between catalog tables.End of change

About this task

The following table spaces do not have entries in SYSIBM.SYSLGRNX. The indexes that are associated with these table spaces also do not have entries in SYSIBM.SYSLGRNX, even if they were defined with COPY YES. These objects are assumed to be open from the point of their last image copy, so the RECOVER utility processes the log from that point forward.

  • DSNDB01.SYSUTILX
  • DSNDB01.DBD01
  • DSNDB01.SYSLGRNX
  • DSNDB06.SYSCOPY
  • DSNDB06.SYSGROUP (SYSGROUP does not have entries in SYSLGRNX during conversion mode and some of the enabling-new-function mode processing. After enabling-new-function mode processing, the SYSGROUP catalog table space is replaced by two new table spaces, DSNDB06.SYSTSSTG and DSNDB06.SYSTSVOL, and these new table spaces do have SYSLGRNX entries.)
  • Start of changeDSNDB01.SYSDBDXAEnd of change
Requirement: You must recover the catalog and directory objects in the order that is specified in this task. If you are recovering any subset of the objects in the list, start with the object that is listed first and continue in the order of the list. For example, if you need to recover SYSLGRNX, SYSUTILX, and SYSUSER, recover SYSUTILX first, then SYSLGRNX, and then SYSUSER. You do not need to recover all of the objects; only recover those objects that require recovery.
General guidelines: Use the following general guidelines for all of the steps in this task:
  • If you copy your catalog or directory indexes, use the RECOVER utility to recover your indexes. Otherwise, use the REBUILD INDEX utility to rebuild those indexes.
  • For all catalog and directory table spaces, you can list the IBM®-defined indexes that have the COPY YES attribute in the same RECOVER utility statement.
  • Recovery of the items in the list can be done concurrently or included in the same job step. However, the following restrictions apply:
    • When you recover the following table spaces or indexes, the job step in which the RECOVER statement appears must not contain any other utility statements. No other utilities can run while the RECOVER utility is running.
      • DSNDB01.SYSUTILX
      • All indexes on SYSUTILX
      • DSNDB01.DBD01
    • When you recover the following table spaces, no other utilities can run while the RECOVER utility is running. Other utility statements can exist in the same job step.
      • DSNDB06.SYSCOPY
      • DSNDB01.SYSLGRNX
Special instructions for conversion mode 8: Start of changeIf the DB2 for z/OS subsystem is in CM8, recover the catalog and directory objects in the order that is defined for Version 8 (DB2 UDB for z/OS Version 8 Utility Guide and Reference SC18-7427-10), with the following changes:
  • Add the following steps between step 12 and step 13:
    • Recover DSNDB06.SYSRTSTS.
    • Recover or rebuild all indexes on DSNDB06.SYSRTSTS. If no user-defined indexes that are STOGROUP-managed are defined on SYSRTSTS, execute the following utility statement to rebuild IBM-defined and any user-defined indexes on SYSRTSTS:
      REBUILD INDEX (ALL) TABLESPACE DSNDB06.SYSRTSTS
      If user-defined indexes that are STROGROUP-managed are defined on SYSRTSTS, rebuild the IBM-defined indexes individually and then rebuild the user-defined indexes in step 16.
  • In step 15 ("Other catalog and directory table spaces and their IBM-defined indexes."), add the following objects.
    Table 1. Additional table spaces to recover in conversion mode from Version 8 (CM8)
    Additional table spaces to recover in conversion mode from Version 8 (CM8)
    SYSROLES
    SYSPLUXA
    SYSCONTX
    SYSXML
    SYSTARG
    SYSTSUNI
    SYSTSASC
End of change
Special instructions for conversion mode 9: Start of changeIf the DB2 for z/OS subsystem is in CM9, recover the catalog and directory objects in the order that is defined for Version 9 (DB2 9 for z/OSRecovering catalog and directory objects ), with one change. In step 17 "Recover other catalog and directory table spaces and their IBM-defined indexes."), add the following objects:
Table 2. Additional table spaces to recover in conversion mode from Version 9 (CM9)
Additional table spaces to recover in conversion mode from Version 9 (CM9)
SYSTSUNI
SYSTSASC
     
End of change

Procedure

To recover catalog and directory objects:

  1. Recover DSNDB01.SYSUTILX.
  2. Run REBUILD INDEX(ALL) on DSNDB01.SYSUTILX.
  3. Recover DSNDB01.DBD01.
  4. Run REBUILD INDEX(ALL) on DSNDB01.DBD01.
  5. Recover DSNDB01.SYSDBDXA.
  6. Run REBUILD INDEX(ALL) on DSNDB01.SYSDBDXA.
  7. Recover DSNDB06.SYSCOPY.
  8. Start of changeRun REBUILD INDEX(ALL) on DSNDB06.SYSCOPY. End of change
  9. Recover DSNDB01.SYSLGRNX.
  10. Run REBUILD INDEX(ALL) on DSNDB01.SYSLGRNX.
  11. For conversion mode, recover DSNDB06.SYSGROUP. For new-function mode, recover DSNDB06.SYSTSSTG and DSNDB06.SYSTSVOL.
  12. Run REBUILD INDEX(ALL) on DSNDB06.SYSGROUP, DSNDB06.SYSTSSTG, and DSNDB06.SYSTSVOL.
  13. Start of changeRecover all of the remaining catalog and directory table spaces in a single RECOVER utility statement with the PARALLEL option.
    Conversion mode*: If the subsystem is in conversion mode*, use the instructions in this step as follows:
    • If the subsystem was previously in new-function mode, use the instructions for new-function mode.
    • If the subsystem made it part of the way through the enabling-new-function mode process before going to conversion mode* use the instructions for enabling-new-function mode.

    In enabling-new-function mode, recover all of the active, new, and obsolete catalog and directory table spaces, including the following table spaces:

    • The directory table spaces in DSNDB01:
      • SCT02
      • SPT01
      • SYSSPUXA
      • SYSSPUXB
    • The catalog table spaces that are listed in the following table:
      Table 3. Remaining catalog table spaces to recover in enabling-new-function mode
      Remaining catalog table spaces to recover in enabling-new-function mode
      SYSALTER
      SYSCONTX
      SYSDBASE
      SYSDBAUT
      SYSDDF
      SYSEBCDC
      SYSGPAUT
      SYSGRTNS
      SYSHIST
      SYSJAUXA
      SYSJAUXB
      SYSJAVA
      SYSOBJ
      SYSPKAGE
      SYSPLAN
      SYSPLUXA
      SYSPLUXB
      SYSROLES
      SYSRTSTS
      SYSSEQ
      SYSSEQ2
      SYSSTATS
      SYSSTR
      SYSTARG
      SYSTSADT
      SYSTSASC
      SYSTSATS
      SYSTSATW
      SYSTSATX
      SYSTSAUX
      SYSTSCOL
      SYSTSCON
      SYSTSCTD
      SYSTSCTL
      SYSTSCTR
      SYSTSDAT
      SYSTSDBA
      SYSTSDBR
      SYSTSDBU
      SYSTSDEP
      SYSTSENV
      SYSTSFAU
      SYSTSFLD
      SYSTSFOR
      SYSTSIPT
      SYSTSIXR
      SYSTSIXS
      SYSTSIXT
      SYSTSKEY
      SYSTSKYC
      SYSTSPDO
      SYSTSPDT
      SYSTSPEN
      SYSTSPHX
      SYSTSPKA
      SYSTSPKC
      SYSTSPKD
      SYSTSPKG
      SYSTSPKL
      SYSTSPKS
      SYSTSPKX
      SYSTSPKY
      SYSTSPLA
      SYSTSPLD
      SYSTSPLN
      SYSTSPLY
      SYSTSPRH
      SYSTSPRM
      SYSTSPTX
      SYSTSPVR
      SYSTSQRA
      SYSTSQRO
      SYSTSQRP
      SYSTSQRY
      SYSTSRAU
      SYSTSREL
      SYSTSROU
      SYSTSSCM
      SYSTSSTM
      SYSTSSYN
      SYSTSTAB
      SYSTSTAU
      SYSTSTBC
      SYSTSTPF
      SYSTSTPT
      SYSTSTRG
      SYSTSTRT
      SYSTSTSP
      SYSTSUNI
      SYSTSVEW
      SYSTSVTR
      SYSTSVWD
      SYSTSVWT
      SYSTSXTM
      SYSTSXTS
      SYSUSER
      SYSVIEWS
      SYSXML

    In new-function mode, recover all of the active catalog and directory table spaces, including the following table spaces:

    • The directory table spaces in DSNDB01:
      • SCT02
      • SPT01
      • SYSSPUXA
      • SYSSPUXB
    • The catalog table spaces that are listed in the following table:
      Table 4. Remaining catalog table spaces to recover in new-function mode
      Remaining catalog table spaces to recover in new-function mode
      SYSALTER
      SYSCONTX
      SYSDDF
      SYSEBCDC
      SYSGPAUT
      SYSGRTNS
      SYSHIST
      SYSJAUXA
      SYSJAUXB
      SYSJAVA
      SYSPLUXA
      SYSPLUXB
      SYSROLES
      SYSRTSTS
      SYSSEQ
      SYSSEQ2
      SYSSTATS
      SYSSTR
      SYSTARG
      SYSTSADT
      SYSTSASC
      SYSTSATS
      SYSTSATW
      SYSTSATX
      SYSTSAUX
      SYSTSCOL
      SYSTSCON
      SYSTSCTD
      SYSTSCTL
      SYSTSCTR
      SYSTSDAT
      SYSTSDBA
      SYSTSDBR
      SYSTSDBU
      SYSTSDEP
      SYSTSENV
      SYSTSFAU
      SYSTSFLD
      SYSTSFOR
      SYSTSIPT
      SYSTSIXR
      SYSTSIXS
      SYSTSIXT
      SYSTSKEY
      SYSTSKYC
      SYSTSPDO
      SYSTSPDT
      SYSTSPEN
      SYSTSPHX
      SYSTSPKA
      SYSTSPKC
      SYSTSPKD
      SYSTSPKG
      SYSTSPKL
      SYSTSPKS
      SYSTSPKX
      SYSTSPKY
      SYSTSPLA
      SYSTSPLD
      SYSTSPLN
      SYSTSPLY
      SYSTSPRH
      SYSTSPRM
      SYSTSPTX
      SYSTSPVR
      SYSTSQRA
      SYSTSQRO
      SYSTSQRP
      SYSTSQRY
      SYSTSRAU
      SYSTSREL
      SYSTSROU
      SYSTSSCM
      SYSTSSTM
      SYSTSSYN
      SYSTSTAB
      SYSTSTAU
      SYSTSTBC
      SYSTSTPF
      SYSTSTPT
      SYSTSTRG
      SYSTSTRT
      SYSTSTSP
      SYSTSUNI
      SYSTSVEW
      SYSTSVTR
      SYSTSVWD
      SYSTSVWT
      SYSTSXTM
      SYSTSXTS
      SYSUSER
      SYSXML
    End of change
  14. Start of changeRun REBUILD INDEX(ALL) on DSNDB06.SYSRTSTS. End of change
  15. Start of changeRun REBUILD INDEX(ALL) on DSNDB06.SYSTSTSP, DSNDB06.SYSTSTPT, and DSNDB06.SYSTSTAB.

    Execute the following utility statements to rebuild the IBM-defined and any user-defined indexes on the table spaces:

     REBUILD INDEX (ALL) TABLESPACE DSNDB06.SYSTSTSP
     REBUILD INDEX (ALL) TABLESPACE DSNDB06.SYSTSTPT
     REBUILD INDEX (ALL) TABLESPACE DSNDB06.SYSTSTAB 
    End of change
  16. Rebuild all of the remaining catalog and directory indexes using REBUILD INDEX(ALL) for each table space recovered in step 13. Rebuild all user-defined indexes on the catalog that have not been rebuilt or recovered yet.

Results

Messages that you might receive:

Start of changeDSNU1530IEnd of change
Start of changeIf you are recovering the catalog and directory during migration to a new version, you might receive message DSNU1530I with RC0. This message is issued if your RECOVER statement or REBUILD INDEX statement specifies a catalog or directory object that no longer exists in the new version or has not yet been created in the new version. In this case, DB2 skips the object. No action is required.End of change
Start of changeDSNT500IEnd of change
Start of changeAn ID with a granted authority receives message DSNT500I RESOURCE UNAVAILABLE while trying to recover a table space in the catalog or directory if certain table spaces in the following list are unavailable:
  • DSNDB06.SYSTSFAU
  • DSNDB06.SYSTSCOL
  • DSNDB06.SYSTSTSP
  • DSNDB06.SYSTSTPT
  • DSNDB06.SYSTSTAB
  • DSNDB06.SYSTSIXS
  • DSNDB06.SYSTSIXT
  • DSNDB06.SYSTSIXR
  • DSNDB06.SYSTSIPT
  • DSNDB06.SYSTSREL
  • DSNDB06.SYSTSFOR
  • DSNDB06.SYSTSSYN
  • DSNDB06.SYSTSFLD
  • DSNDB06.SYSTSTAU
  • DSNDB06.SYSTSKEY
  • DSNDB06.SYSUSER

If you receive message DSNT500I, you must take one of the following actions:

  • Make these table spaces available.
  • Run the RECOVER utility on the catalog or directory by using an authorization ID that has the installation SYSADM or installation SYSOPR authority.
End of change
Start of changeDSNT501IEnd of change
Start of changeIf certain table spaces in DSNDB06 are unavailable when an ID with a granted authority tries to rebuild indexes in the catalog or directory, DB2 issues message DSNT501I.End of change

What to do next

After you recover the DB2 catalog and directory, perform the following actions:

  • Start of changeAfter a point-in-time recovery on the catalog and directory, run the CHECK DATA utility on the objects to ensure consistency.End of change
  • Start of changeRecover XML scheme repository objects. Although the XML schema repository database, DSNXSR, is not part of the DB2 catalog, you need to recover all table spaces in the DSNXSR database and rebuild all indexes on those table spaces immediately after you recover the DB2 catalog. If you perform a point-in-time recovery of the catalog, you need to recover objects in the DSNXSR database to the same point in time.End of change