Utility history information in SYSUTILITIES
FL 501 Utility history information is stored in the Db2 catalog table SYSIBM.SYSUTILITES. Each row in this table represents one utility execution.
Lists of objects
If object names are explicitly specified in a utility statement, the statement is counted as one utility execution and only one row is inserted into SYSUTILITIES. If a utility operates on a LISTDEF list, the number of rows inserted into SYSUTILITIES varies depending upon the utility, the utility options specified, and the LISTDEF options specified, as follows:
- For COPY, RECOVER, COPYTOCOPY, and QUIESCE, one SYSUTILITIES row is inserted, regardless of how many objects are in the list.
- For CHECK INDEX, REBUILD INDEX (on a list of index spaces), REORG TABLESPACE on one or more partitions, RUNSTATS INDEX, and UNLOAD, one SYSUTILITIES row is inserted for each group of related indexes or related partitions in the list. Related indexes are those indexes over the same table. Related partitions are partitions that belong to the same table space.
- For MERGECOPY, MODIFY RECOVERY, MODIFY STATISTICS, REBUILD INDEX (on a list of table spaces), REORG TABLESPACE, REORG INDEX, RUNSTATS TABLESPACE, and REPORT RECOVERY requested at the table-space level or index-space level, one SYSUTILITIES row is inserted for each table space or index space in the list.
- For MERGECOPY, MODIFY RECOVERY, MODIFY STATISTICS, REBUILD INDEX (on a list of table spaces), REORG INDEX, RUNSTATS TABLESPACE, REPORT RECOVERY requested at the partition level, one SYSUTILITIES row is inserted for each table space partition or index space partition in the list.
If a list of objects is split into separate utility executions by Db2, each execution results in a separate row in SYSUTILITIES. For example, if a REORG TABLESPACE statement includes LISTPARTS n to limit the number of partitions processed by a REORG execution, the number of rows in SYSUTILITIES depends on how many partitions are included in the LISTDEF and LISTPARTS specifications.
SYSUTILITIES column updates
When querying SYSUTILITIES for history information, you should understand how some of the following essential columns are updated:
- EVENTID column
- The EVENTID column contains a BIGINT value that uniquely identifies a utility execution. This column value is set by using sequence SYSIBM.DSNSEQ_EVENTID. This column is not an identity column.
- NUMOBJECTS and LISTNAME columns
- The NUMOBJECTS column value is the number of objects that the utility will
process. The utility sets these objects in one of the following
utility-in-progress states: UTRW, UTRO, or UTUT. For partitioned objects,
each partition is counted as one object even if the utility operation was
requested at the space level. Non-partitioned objects are counted as one
object, except when a data set-level operation is requested (DSNUM
n is specified) for COPY, RECOVER, COPYTOCOPY, MODIFY
RECOVERY, or MERGECOPY; in these cases, each data set counts as one object.
Some utilities, such as STOSPACE, REPORT RECOVERY, REPORT TABLESPACESET, and REPAIR DBD, do not set utility-in-progress states on objects. REPORT RECOVERY, REPORT TABLESPACESET and REPAIR DBD set NUMOBJECTS to 1. STOSPACE sets NUMOBJECTS to the number of storage groups that are specified by the user. The CATMAINT utility does not set a value for NUMOBJECTS.
- RETURNCODE and CONDITION columns
- The RETURNCODE and CONDITION column values can be used to determine the
current status or completion status of a utility execution as follows:
Table 1. RETURNCODE and CONDITION columns RETURNCODE value CONDITION value Explanation Null Blank The utility is active or stopped. 0 or 4 E The utility ended successfully. When RETURNCODE=4, one or more warning messages were issued. 8 E The utility ended with one or more errors. 8 T An active utility accepted a TERM UTIL command and terminated. Message DSNU170I was issued to the job output. Null T A TERM UTIL command terminated the stopped utility. Null F A START DB SP ACCESS(FORCE) command terminated the utility.
For a list of all SYSUTILITIES columns and their descriptions, see SYSUTILITIES catalog table.