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
  • Start of changeConverting page sets to or from extended 10-byte format during REBUILD INDEX on catalog and directory indexes complicates recovery and might cause failures. To avoid conversions, set the UTILITY_OBJECT_CONVERSION subsystem parameter to NONE until all catalog and directory objects are recovered. Alternatively, specify RBALRSN_CONVERSION NONE on all REBUILD INDEX steps.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.

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.

Start of change
  • DSNDB01.SYSUTILX
  • DSNDB01.DBD01
  • DSNDB01.SYSLGRNX
  • Start of changeDSNDB06.SYSTSCPY (SYSTSCPY replaces SYSCOPY during enabling-new-function mode processing. The SYSCOPY catalog table space is used in conversion mode until the SYSCOPY table space is replaced during enabling-new-function mode.)End of change
  • DSNDB01.SYSDBDXA
End 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.
      • Start of changeDSNDB06.SYSTSCPYEnd of change
      • DSNDB01.SYSLGRNX
Special instructions for conversion mode: Start of changeIf the Db2 for z/OS subsystem is in conversion mode, recover the catalog and directory objects in the order that is defined for Version 10 (DB2 10 for z/OS: Recovering catalog and directory objects) with one change. In step "Recover all of the remaining catalog and directory table spaces," add the following objects:
Table 1. Additional table spaces to recover in conversion mode (CM10)
Additional catalog table spaces to recover in conversion mode (CM10)
SYSTSOBX
SYSTSQRE
SYSTSQRS
SYSTSVAR
SYSTSVAT
SYSTSVAD
SYSTSVAU
SYSTSIXC
SYSTSSFB
   
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. Start of change Recover DSNDB06.SYSTSCPY.

    If the SYSCOPY table space has not been converted by enabling-new-function mode processing (job DSNTIJEN step ENFM0037), recover DSNDB06.SYSCOPY instead of DSNDB06.SYSTSCPY

    End of change
  8. Run REBUILD INDEX(ALL) on DSNDB06.SYSTSCPY.

    Start of changeIf the SYSCOPY table space has not been converted by enabling-new-function mode processing (job DSNTIJEN step ENFM0037), run REBUILD INDEX(ALL) on DSNDB06.SYSCOPY instead of DSNDB06.SYSTSCPY.End of change

  9. Recover DSNDB01.SYSLGRNX.
  10. Run REBUILD INDEX(ALL) on DSNDB01.SYSLGRNX.
  11. Recover DSNDB06.SYSTSSTG and DSNDB06.SYSTSVOL.
  12. Run REBUILD INDEX(ALL) on DSNDB06.SYSTSSTG and DSNDB06.SYSTSVOL.
  13. Start of change Recover all of the remaining catalog and directory table spaces in a single RECOVER utility statement with the PARALLEL option.

    The remaining catalog and directory table spaces include the following tables spaces:

    • The directory table spaces in DSNDB01:
      • SCT02
      • SPT01
      • SYSSPUXA
      • SYSSPUXB
    • The catalog table spaces that are listed in the following table:
      Start of change
      Table 2. Remaining catalog table spaces to recover in new-function mode
      SYSALTER
      SYSCONTX
      SYSDDF
      SYSEBCDC
      SYSGPAUT
      SYSGRTNS
      SYSHIST
      SYSJAUXA
      SYSJAUXB
      SYSJAVA
      SYSPLUXA
      SYSPLUXB
      SYSROLES
      SYSSEQ
      SYSSEQ2
      SYSSTATS
      SYSTARG
      SYSTSADT
      SYSTSASC
      SYSTSATS
      SYSTSATW
      SYSTSATX
      SYSTSAUX
      SYSTSCHX
      SYSTSCKD
      SYSTSCKS
      SYSTSCOL
      SYSTSCON
      SYSTSCTD
      SYSTSCTL
      SYSTSCTR
      SYSTSDAT
      SYSTSDBA
      SYSTSDBR
      SYSTSDBU
      SYSTSDEP
      SYSTSENV
      SYSTSFAU
      SYSTSFLD
      SYSTSFOR
      SYSTSIPT
      SYSTSISS
      SYSTSIXC
      SYSTSIXR
      SYSTSIXS
      SYSTSIXT
      SYSTSKEY
      SYSTSKYC
      SYSTSOBX
      SYSTSPDO
      SYSTSPDT
      SYSTSPEN
      SYSTSPHX
      SYSTSPKA
      SYSTSPKC
      SYSTSPKD
      SYSTSPKG
      SYSTSPKL
      SYSTSPKS
      SYSTSPKX
      SYSTSPKY
      SYSTSPLA
      SYSTSPLD
      SYSTSPLN
      SYSTSPLY
      SYSTSPRH
      SYSTSPRM
      SYSTSPTX
      SYSTSPVR
      SYSTSQRA
      SYSTSQRE
      SYSTSQRO
      SYSTSQRP
      SYSTSQRS
      SYSTSQRY
      SYSTSRAU
      SYSTSREL
      SYSTSROU
      SYSTSSCM
      SYSTSSFB
      SYSTSSRG
      SYSTSSTM
      SYSTSSYN
      SYSTSTAB
      SYSTSTAU
      SYSTSTBC
      SYSTSTPF
      SYSTSTPT
      SYSTSTRG
      SYSTSTRT
      SYSTSTSP
      SYSTSTSS
      SYSTSUNI
      SYSTSVAD
      SYSTSVAR
      SYSTSVAT
      SYSTSVAU
      SYSTSVEW
      SYSTSVTR
      SYSTSVWD
      SYSTSVWT
      SYSTSXTM
      SYSTSXTS
      SYSUSER
      SYSXML
      End of change
    • Start of changeIf DSNDB06.SYSRTSTS has not been converted by enabling-new-function mode processing (job DSNTIJEN, step ENFM0047), run REBUILD INDEX(ALL) on DSNDB06.SYSRTSTS instead of DSNDB06.SYSTSISS and DSNDB06.SYSTSTSS.End of change
    • Start of changeIf DSNDB06.SYSSTR has not been converted by enabling-new-function mode processing (job DSNTIJEN, step ENFM0077), run REBUILD INDEX(ALL) on DSNDB06.SYSSTR instead of DSNDB06.SYSTSCHX, DSNDB06.SYSTSCKD, DSNDB06.SYSTSCKS, and DSNDB06.SYSTSSRG.End of change
    End of change
  14. Run REBUILD INDEX(ALL) on DSNDB06.SYSTSISS and DSNDB06.SYSTSTSS.

    Start of changeIf the SYSRTSTS table space has not been converted by enabling-new-function mode processing (job DSNTIJEN steps ENFM0047), run REBUILD INDEX(ALL) on DSNDB06.SYSRTSTS instead of DSNDB06.SYSTSISS and DSNDB06.SYSTSTSS.End of change

  15. Start of change Run 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            
                          RBALRSN_CONVERSION NONE                
      REBUILD INDEX (ALL) TABLESPACE DSNDB06.SYSTSTPT            
                          RBALRSN_CONVERSION NONE                
      REBUILD INDEX (ALL) TABLESPACE DSNDB06.SYSTSTAB            
                          RBALRSN_CONVERSION NONE
    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:

DSNU1530I
If 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.
DSNT500I
An 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.
DSNT501I
If 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.

What to do next

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

  • After a point-in-time recovery on the catalog and directory, run the CHECK DATA utility on the objects to ensure consistency.
  • Recover 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.