DB2 Version 9.7 for Linux, UNIX, and Windows

UPDATE MONITOR SWITCHES command

Turns one or more database monitor recording switches on or off. When the database manager starts, the settings of the six switches are determined by the dft_mon database manager configuration parameter.

The database monitor records a base set of information at all times. Users who require more than this basic information can turn on the appropriate switches, but at a cost to system performance. The amount of information available in output from the GET SNAPSHOT command reflects which, if any, switches are on.

Authorization

One of the following:
  • sysadm
  • sysctrl
  • sysmaint
  • sysmon

Required connection

Instance or database:
  • If there is neither an attachment to an instance, nor a connection to a database, a default instance attachment is created.
  • If there is both an attachment to an instance, and a database connection, the instance attachment is used.

To update the monitor switches at a remote instance (or a different local instance), it is necessary to first attach to that instance.

Command syntax

Read syntax diagramSkip visual syntax diagram
                                  .----------------------.   
                                  V                      |   
>>-UPDATE MONITOR SWITCHES USING----switch-name--+-ON--+-+------>
                                                 '-OFF-'     

>--+----------------------------------------+------------------><
   +-AT DBPARTITIONNUM--db-partition-number-+   
   '-GLOBAL---------------------------------'   

Command parameters

USING switch-name
The following switch names are available:
BUFFERPOOL
Buffer pool activity information
LOCK
Lock information
SORT
Sorting information
STATEMENT
SQL statement information
TABLE
Table activity information
TIMESTAMP
Monitoring timestamp information
UOW
Unit of work information.
AT DBPARTITIONNUM db-partition-number
Specifies the database partition for which the status of the monitor switches is to be displayed.
GLOBAL
Returns an aggregate result for all database partitions in a partitioned database environment.

Usage notes

Information is collected by the database manager only after a switch is turned on. The switches remain set until db2stop is issued, or the application that issued the UPDATE MONITOR SWITCHES command terminates. To clear the information related to a particular switch, set the switch off, then on.

Updating switches in one application does not affect other applications.

To view the switch settings, use the GET MONITOR SWITCHES command.

Compatibilities

For compatibility with versions earlier than Version 8:
  • The keyword NODE can be substituted for DBPARTITIONNUM.