Managing common utility tables


This section provides basic procedures for working with the common utility tables. For more information about common utility tables, see  Common-utility-tables.

Before you begin

This section describes important information that you need to know when using the common utility tables.

Warnings
  • Do not run LOADPLUS, REORG PLUS, or UNLOAD PLUS against the BMC common utility tables or table spaces. Doing so can cause unpredictable results.
  • Because BMC AMI Recover uses BMC tables during the recovery process, you cannot use BMC AMI RecoverBMC AMI Recover to recover the BMC tables, with the exception of the BMCHIST table.
  • Do not run the RUNSTATS utility against the BMC common utility tables. Doing so can negatively impact utility performance.
  • We strongly recommend that you use the ISOLATION (UR) bind option and issue SQL COMMIT statements when querying the tables in the BMC database. If objects in the BMC database are restricted for UPDATE, the executing BMC utilities might not be able to complete successfully.

Note the following considerations when using the common utility tables:

  • Some columns in the tables are present for compatibility with specific BMC utilities and are not used by all of the utilities.
  • If you have applications that depend on the structure or content of these tables, be aware that these tables are subject to change.
  • In general, the utility tables should not require maintenance, with the exception of BMCHIST.
  • You should back up the BMC table spaces on a regular basis to enable recoveries. If you use BMC AMI Copy as the copy utility, you must use SHRLEVEL CHANGE for the following spaces:
    • BMCUTIL
    • BMCUTIL2
    • BMCHIST
    • BMCSYNC
    • BMCXCOPY
    • BMCHISTS
    • BMCHISTO

To determine your site’s table names

The names of the common utility tables can be changed during installation. To determine the names that your site uses, perform one of the actions:

  • Use your utility to run a job with restart parameters of MAINT and MSGLEVEL(1). Specifying MSGLEVEL(1) with MAINT prints the names of the BMC tables that your utility uses and identifies the applied maintenance. The utility does not perform any other processing, and the job ends without affecting any utility that is running.
  • Run the SQL statement, replacing tableName with a BMC common utility table name (listed in Common utility tables, above):

    SELECT CREATOR.NAME FROM SYSIBM.SYSTABLES
      WHERE TSNAME='tableName';
  • Get the names from your Db2 system administrator.

To query the tables

Run SQL statements similar to the examples.

EXAMPLES

This example queries the BMCXCOPY table to access information about the rows in an index space:

 SELECT *
FROM creatorName.CMN_BMCXCOPY
    WHERE DBNAME = 'databaseName'
    AND IXNAME = 'indexSpaceName'
   ORDER BY START_RBA;

This example identifies (from the BMCHIST table) the database name, table space name, elapsed time, and when the utility completed:

SELECT DBNAME,SPNAME,CHAR(ELAPSED,ISO),CHAR(TIME,ISO)
FROM creatorName.CMN_BMCHIST
   WHERE UTILID='utilityID';

To display BMC utility status

To display the status of all BMC utilities that are executing or awaiting restart for a given table space or index space, use the following SQL statements:

SELECT * FROM creatorName.CMN_BMCUTIL
  WHERE DBNAME='databaseName'
     AND SPNAME='tableSpaceName'
SELECT * FROM creatorName.CMN_BMCSYNC
  WHERE NAME1='databaseName'
     AND NAME2='spaceName';

To terminate a BMC utility

To terminate a BMC utility that is executing, use the following SQL statements:
(BMC.DB2.SPE2404)

DELETE FROM creatorName.CMN_BMCUTIL
 WHERE UTILID='utilityID';
DELETE FROM creatorName.CMN_BMCSYNC
 WHERE UTILID='utilityID';
DELETE FROM <creatorName>.CMN_BMCUTIL2
 WHERE UTILID='<utilityID>';
DELETE FROM creatorName.CMN_BMCDICT -- for LOADPLUS and REORG PLUS
 WHERE UTILID='utilityID';

The utility terminates with return code 8 when the next checkpoint is taken.

To clean up a BMC utility that is not executing, run the utility with the correct utility ID and specify TERM as the restart parameter.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*