DB2 10.5 for Linux, UNIX, and Windows

DBMS_UTILITY module

The DBMS_UTILITY module provides various utility programs.

The schema for this module is SYSIBMADM.

The DBMS_UTILITY module includes the following routines.

Table 1. Built-in routines available in the DBMS_UTILITY module
Routine Name Description
ANALYZE_DATABASE procedure Analyze database tables, clusters, and indexes.
ANALYZE_PART_OBJECT procedure Analyze a partitioned table or partitioned index.
ANALYZE_SCHEMA procedure Analyze schema tables, clusters, and indexes.
CANONICALIZE procedure Canonicalizes a string (for example, strips off white space).
COMMA_TO_TABLE procedure Convert a comma-delimited list of names to a table of names.
COMPILE_SCHEMA procedure Compile programs in a schema.
DB_VERSION procedure Get the database version.
EXEC_DDL_STATEMENT procedure Execute a DDL statement.
FORMAT_CALL_STACK function Get a description of the current call stack.
FORMAT_ERROR_BACKTRACE function Get a description of the call stack that existed at the time of the most recent error within a compiled SQL routine.
GET_CPU_TIME function Get the current CPU time.
GET_DEPENDENCY procedure Get objects that depend on the given object.
GET_HASH_VALUE function Compute a hash value.
GET_TIME function Get the current time.
NAME_RESOLVE procedure Resolve the given name.
NAME_TOKENIZE procedure Parse the given name into its component parts.
TABLE_TO_COMMA procedure Convert a table of names to a comma-delimited list.
VALIDATE procedure Make an invalid database object valid.

The following table lists the built-in variables and types available in the DBMS_UTILITY module.

Table 2. DBMS_UTILITY public variables
Public variables Data type Description
lname_array TABLE For lists of long names.
uncl_array TABLE For lists of users and names.
The LNAME_ARRAY is for storing lists of long names including fully-qualified names.
ALTER MODULE SYSIBMADM.DBMS_UTILITY PUBLISH TYPE LNAME_ARRAY AS VARCHAR(4000) ARRAY[];
The UNCL_ARRAY is for storing lists of users and names.
ALTER MODULE SYSIBMADM.DBMS_UTILITY PUBLISH TYPE UNCL_ARRAY  AS VARCHAR(227)  ARRAY[];