Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Copy for Db2 13.1.

RUNSTATS


The RUNSTATS option allows you to combine the production of image copies and the collection of Db2 statistics in a single pass of a table space or partition. The subordinate RUNSTATS options, REPORT, BMCSTATS, and UPDATE allow you to report the statistics in SYSPRINT and update the BMC or Db2 catalog with the statistics.

RUNSTATS syntax diagram

GUID-ABBAFC03-3C45-489A-A91B-4505E90652DD-low.png

Important

  • RUNSTATS is not valid with FULL NO, FULL AUTO, or CHANGELIMIT (incremental) copies.
  • Do not run RUNSTATS for the BMCLGRNX table. Statistics on this empty table space can result in poor access paths and degraded performance for BMC AMI Copy.
  • BMCLGRNX table is not used with Db2 version 11 and later.

For a description of the statistics produced by RUNSTATS, see the IBM website.

Statistics are not collected for the following items:

  • Indexes.
  • DSNUM integer copy of a nonpartitioned space.
  • DSNUM integer copies of partitioned spaces cannot report or update aggregate statistics, SYSTABLESPACE and SYSTABLES, unless statistics for the other partitions are found in the catalog tables.
  • DSNDB06.SYSCOPY or any spaces in DSNDB01.
  • RUNSTATS is not valid for spaces in REORP status.
  • RUNSTATS and all of its suboptions are ignored for Instant Snapshots.

Option

Description

RUNSTATS

The following are the values of RUNSTATS:

Value

Description

RUNSTATS NO 

(Default) Specifying RUNSTATS NO tells 

BMC AMI Copy

 that statistics should not be collected.

RUNSTATS YES 

Specifying RUNSTATS YES tells 

BMC AMI Copy

 that statistics should be collected.

REPORT

The REPORT option under RUNSTATS determines if a set of messages is generated to report the collected statistics.

Values of REPORT

Value

Description

REPORT NO

(Default) REPORT NO indicates that collected statistics should not be output via messages to SYSPRINT.

REPORT YES

REPORT YES indicates that collected statistics should be output via messages to SYSPRINT. The messages generated are dependent upon the combination of keywords specified with RUNSTATS. REPORT YES always generates a report of SPACE and ACCESSPATH statistics regardless of what UPDATE option specifies.

BMCSTATS

The BMCSTATS option under RUNSTATS specifies if the collected table space or table level statistics for RUNSTATS are reflected in the BMCSTATS tables.

Values of BMCSTATS

Value

Description

BMCSTATS NO

(Default) BMCSTATS NO indicates that collected statistics should not be reflected in the BMCSTATS tables.

BMCSTATS YES

BMCSTATS YES indicates that collected statistics should be reflected in the BMCSTATS tables. This option requires BMC DASD MANAGER PLUS version 5.3 or later. You will get a -206 warning on the bind if synonyms do not exist. At runtime, if the tables are not found, BMC AMI Copy issues an error message and the job fails.

Important

When you specify UPDATE NONE with BMCSTATS YES, BMC AMI Copy will update BMCSTATS but will not update the IBM Db2 statistics.

UPDATE

The UPDATE option under RUNSTATS specifies whether BMC AMI Copy should update the Db2 statistics. Use the option to indicate if BMC AMI Copy should update the Db2 catalog with the collected statistics, and if so, which category of statistics BMC AMI Copy should update. UPDATE also allows you to select statistics used for access path selection or statistics used by database administrators.

Tables updated with RUNSTATS UPDATE option shows the Db2 catalog tables that are updated when you use the UPDATE option. For a description of the Db2 catalog tables, see the DB2 for z/OS SQL Reference documentation . Columns updated with RUNSTATS UPDATE option shows the columns that are updated when you specify RUNSTATS UPDATE.

 Tables updated with RUNSTATS UPDATE option

UPDATE option

Table updated

ALL

SYSTABLEPART

SYSTABLES

SYSTABLESPACE

SYSTABSTATS

NONE

None

ACCESSPATH

SYSTABLES

SYSTABLESPACE

SYSTABSTATS

SPACE

SYSTABLEPART

 Columns updated with RUNSTATS UPDATE option

Table

Columns updated

SYSTABLEPART

CARD

CARDF

NEARINDREF

FARINDREF

PERCACTIVE

PERCDROP

SYSTABLES

CARD 1

NPAGES

PCTPAGES

PCTROWCOMP

STATSTIME

CARDF

SYSTABLESPACE

NACTIVE

NACTIVEF

STATSTIME

SYSTABSTATS

CARD

NPAGES

PCTPAGES

NACTIVE

PCTROWCOMP

STATSTIME

 

1 This DSNUM value applies to index copies only—not to table spaces copies.

If BMCSTATS YES is specified, all BMCSTATS tables are updated. F or information about the BMCSTATS tables and how BMC AMI Copy inserts a row with all columns filled except REORG SPACE, see the DASD MANAGER PLUS for DB2 documentation.

Value

Description

UPDATE ALL

(Default) UPDATE ALL indicates that BMC AMI Copy will update all collected statistics in the Db2 catalog.

UPDATE NONE

UPDATE NONE indicates that BMC AMI Copy will not update Db2 catalog tables with collected statistics. This option is only valid when you specify REPORT YES.

Important

When you specify UPDATE NONE with BMCSTATS YES, BMC AMI Copy will update BMCSTATS but does not update the IBM Db2 statistics.

UPDATE ACCESSPATH

UPDATE ACCESSPATH indicates that BMC AMI Copy will update only the Db2 catalog table columns that provide statistics used for access path selection. This includes the SYSTABLESPACE, SYSTABLES, and SYSTABSTATS tables.

Important

BMC AMI Copy updates the SYSTABSTATS table only for partitioned spaces.

UPDATE SPACE

UPDATE SPACE indicates that BMC AMI Copy will update only the Db2 catalog table columns that provide statistics to help assess the status of a particular table space. This includes only the SYSTABLEPART table.



 

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