DB2 Version 9.7 for Linux, UNIX, and Windows

GET STMM TUNING DBPARTITIONNUM command using the ADMIN_CMD procedure

Used to read the catalog tables to report the user preferred self tuning memory manager (STMM) tuning database partition number and current STMM tuning database partition number.

Authorization

The privileges held by the authorization ID of the statement must include at least one of the following authorities or privilege:
  • DBADM
  • SECADM
  • SQLADM
  • ACCESSCTRL
  • DATAACCESS
  • SELECT on SYSIBM.SYSTUNINGINFO

Required connection

Database

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-GET--STMM--TUNING--DBPARTITIONNUM---------------------------><

Example

CALL SYSPROC.ADMIN_CMD( 'get stmm tuning dbpartitionnum' )
The following example is a sample output from this query.
Result set 1
  --------------

  USER_PREFERRED_NUMBER CURRENT_NUMBER
  --------------------- --------------
                      2              2

  1 record(s) selected.

  Return Status = 0

Usage notes

The user preferred self tuning memory manager (STMM) tuning database partition number (USER_PREFERRED_NUMBER) is set by the user and specifies the database partition on which the user wishes to run the memory tuner. While the database is running, the tuning partition is updated asynchronously a few times an hour. As a result, it is possible that the CURRENT_NUMBER and USER_PREFERRED_NUMBER returned are not in sync after an update of the user preferred STMM partition number. To resolve this, either wait for the CURRENT_NUMBER to be updated asynchronously, or stop and start the database to force the update of CURRENT_NUMBER.

Result set information

Command execution status is returned in the SQLCA resulting from the CALL statement. If execution is successful, the command returns additional information in the following result set:
Table 1. Result set returned by the GET STMM TUNING DBPARTITIONNUM command
Column name Data type Description
USER_PREFERRED_NUMBER INTEGER User preferred self tuning memory manager (STMM) tuning database partition number. A value of -1 indicates that the default database partition is used.
CURRENT_NUMBER INTEGER Current STMM tuning database partition number. A value of -1 indicates that the default database partition is used.