Db2 utilities for troubleshooting

The Db2 utilities (UT) subcomponent provides a number of utilities helpful for diagnosing various Db2 problems.

CHECK DATA
CHECK DATA performs the following functions:
  • Reports information about each referential constraint violation it detects and offers options to copy invalid rows to other tables and to delete invalid rows
  • For tables that contain LOB columns, checks for consistency between the base table space and the LOB table space
  • For tables that contain XML columns, checks for consistency between the base table space and the XML table space
  • For tables that contain XML columns, checks XML data integrity and validates against XML schemas for conformance.

For more information, see CHECK DATA.

CHECK LOB
CHECK LOB checks large object (LOB) table spaces for structural defects and invalid LOBs. For more information see CHECK LOB.
CHECK INDEX
CHECK INDEX allows one or more indexes to be checked simultaneously and issues warning messages when it finds an inconsistency. For more information, see CHECK INDEX.
COPY
The COPY utility makes full or incremental copies to sequential data sets, including full imaged copies of index spaces. It produces as many as four copies of the image into four different data sets: two for the local site and two for the recovery site. Incremental copies contain only pages that have changed since the prior copy function; full copies contain the entire table space. For more information, see COPY.
DIAGNOSE
The DIAGNOSE utility enables Db2 service representatives to diagnose problems with utilities. Up to 32 activities can be monitored through the TYPE parameter. These activities are defined as needed by the service staff. The DIAGNOSE can also be used for the following activities:
  • Obtaining dumps for any utility abend, overriding any considerations that might suppress such a dump
  • Send OBD and SYSUTIL information to SYSPRINT for review (DISPLAY option)
  • Dumping both the Db2 MEPL and the application space (DSNUTILB) MEPL to SYSPRINT without forcing an SVC dump (DISPLAY MEPL option)
  • Dumping an entry for a database in SYSIBM.SYSDATABASE to SYSPRINT (DISPLAY option)
  • Forcing Db2 to abend after a specific Db2 message is specified or when a module trace ID is encountered (ABEND option with the MESSAGE or TRACEID option)

For more information, see DIAGNOSE.

DSN1COMP
DSN1COMP is a stand-alone utility that estimates space savings to be achieved by Db2 data compression in data sets. The utility runs on data sets that contain uncompressed data and do not contain index spaces.

The DETAIL and SHOWTREE parameters are provided for use by IBM® support centers to examine dictionary structures:

  • the DETAIL option provides performance related information
  • the SHOWTREE option prints the formatted dictionary tree to the SYSPRINT output data set

For more information , see DSN1COMP.

DSN1COPY
The DSN1COPY stand-alone utility is used for copying VSAM and sequential data sets, performing validity checking on data, index and dictionary pages, and translating object identifiers (OBIDs) to help in moving data sets between different systems. It also prints hexadecimal dumps of data sets and databases.

DSN1COPY also reports if generic clustering is lost in certain catalog table spaces. Contact IBM Support if this occurs. For more information see DSN1COPY.

DSN1LOGP
The DSN1LOGP stand-alone utility reads the recovery log and formats its contents for display. For data sharing, DSN1LOGP prints log records merged from the logs of more than one Db2 subsystem. Either a summary or a detailed report can be requested. For more information see DSN1LOGP.
DSN1PRNT
DSN1PRNT stand-alone is used for printing hexadecimal dumps of table spaces, index spaces, image copy data sets, and sequential data sets, and formats the pages of these data sets. For more information see DSN1PRNT.
DSN1SDMP
The purpose of the DSN1SDMP utility, intended to be used under the direction of IBM Support, is to take dumps and write trace records for diagnostic purposes in a simple and timely manner. The DSN1SDMP utility consists of two features:
  • It can select on any data within a trace record and, if the selection passes, can optionally cause a dump. This function captures the first-failure data much closer to the time of error than was possible before.
  • It can also write Db2 trace records to an z/OS® data set, rather than to z/OS SMF or GTF data sets. This allows trace data to be used more quickly for diagnostic purposes.

For more information, see DSN1SDMP.

MERGE COPY
The MERGECOPY utility can either merge several incremental copies to form a combined incremental copy or merge one or more incremental copies with a full copy to form a combined full copy. MERGECOPY can produce up to four image copies. For more information, see MERGECOPY.
QUEISCE
The QUIESCE utility establishes a point of consistency, a quiesce point, for a table space.

The point of consistency is recorded as the current log RBA in the SYSIBM.SYSCOPY catalog table and can be used by RECOVER TORBA or TOLOGPOINT. TOLOGPOINT can accept an RBA or LRSN. In a data sharing group, the QUIESCE utility quiesces an object for the entire group and records a LRSN that can be used by RECOVER TOLOGPOINT.

For more information, see QUIESCE.

RECOVER
The RECOVER utility recovers entire table spaces and/or index spaces, a data set within a table space or a partition of an index space, or a range of pages within a table space or index space.

To recover a table space, RECOVER looks at the ZPARM to determine if the current system is at the local site or the recovery site and recovers from copies of data registered on the current system.

If you specify the LOCALSITE parameter, only local site image copies are used (even if the site is the recovery site). If you specify the RECOVERYSITE parameter, only recovery site image copies are used (even if the site is the local site).

For more information, see RECOVER.

REBUILD INDEX
The REBUILD INDEX utility rebuilds one or more indexes within a table space, all indexes within a table space, or one or more logical or physical partitions of a partitioning index. To rebuild an index, REBUILD INDEX deletes the erroneous index and builds a new index from the table. For more information , see REBUILD INDEX.
REPAIR
The REPAIR utility is helpful for the diagnosis and repair of inconsistent data. Use the REPAIR utility with extreme caution; incorrect use of REPAIR can cause the loss of data integrity. The REPAIR utility functions useful for diagnosing and repairing problems are: LOCATE, VERIFY, REPLACE, DUMP, SET, and REPAIR DBD. For more information, see REPAIR.
REPORT
The REPORT utility can help to determine the recovery history of a table space. It reports the following information:
  • The SYSIBM.SYSCOPY catalog table recovery records (REPORT can print all the SYSCOPY records in the local system, the recovery system, or both.)
  • Log ranges from the SYSIBM.SYSLGRNX directory table.
  • Log data sets from the bootstrap data set (BSDS)
  • Names of all table spaces in a table space set.

For more information, see REPORT.