Using REPAIR DBD

REPAIR DBD is an extension to the REPAIR utility. It is designed to help maintain consistent database definitions between the Db2 catalog and directory.

Running REPAIR DBD, requires SYSADM authority, SYSCTRL, or installation SYSOPR authority.

REPAIR DBD provides the following abilities:

  • Compare the definition of a database in the catalog with its definition in the directory.
  • Rebuild the directory from the information in the catalog.
  • Remove an inconsistent database descriptor (DBD) from the catalog and the directory.

Db2 must be operational when REPAIR DBD is run. Also, REPAIR assumes referential integrity in the catalog. You can run the CHECK DATA utility or sample queries from member DSNTESQ of the prefix.SDSNSAMP library to verify data consistency within the catalog.

To aid in the diagnosis of an inconsistent DBD, run REPAIR DBD with the DIAGNOSE option. The output from REPAIR DBD contains two DBDs - the actual DBD on DASD and a DBD reconstructed from information in the Db2 catalog and directory. If you can obtain a copy of the inconsistent DBD with REPAIR DBD, continue with Analyzing a DBD. If you use REPAIR DBD to obtain a copy of the inconsistent DBD is not successful, continue with Finding a DBD in a dump.