UPDATE MONITOR SWITCHES command
The 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.
Scope
This command is issued on the currently attached member and, by default, returns information only for that member. In the case of multiple members per host, the currently attached member is the first member that is listed in the db2nodes.cfg file on that host.
To issue the command for a specific member that is not the currently attached member, specify the ATTACH_MEMBER parameter. To issue the command for all members and receive an aggregated result, specify the GLOBAL parameter.
To change the currently attached member, issue the SET CLIENT command with the ATTACH_MEMBER parameter . You must issue the DETACH command followed by the ATTACH command from your application for this change to take effect.
Authorization
- SYSADM
- SYSCTRL
- SYSMAINT
- SYSMON
Required connection
- 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
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 MEMBER member-number
- Specifies the member for which the monitor switches are updated.
- GLOBAL
- Updates the monitor switches on all members.
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
- DBPARTITIONNUM or NODE can be substituted for MEMBER, except when the DB2_ENFORCE_MEMBER_SYNTAX registry variable is set to ON.