Selectively turns on or off switches for groups of monitor data to be collected by the database manager. Returns the current state of these switches for the application issuing the call.
Scope
This API only returns information for the node on which it is executed.
Authorization
One of the following:
Required Connection
Instance. If there is no instance attachment, a default instance attachment is created.
To display the settings for a remote instance (or a different local instance), it is necessary to first attach to that instance.
Version
db2ApiDf.h
C API Syntax
int db2MonitorSwitches (db2Uint32 version, void* pParamStruct, struct sqlca* sqlca); typedef struct { struct sqlm_recording_group *piGroupStates; void *poBuffer; db2Uint32 iBufferSize; db2Uint32 iReturnData; db2Uint32 iVersion; db2int32 iNodeNumber; db2Uint32 *poOutputFormat; }db2MonitorSwitchesData;
API Parameters
Note: | If SQLM_DBMON_VERSION1 is specified as the version, the APIs cannot be run remotely. |
Note: | For standalone instances SQLM_CURRENT_NODE must be used. |
Note: | For detailed information about the use of the database monitor APIs, and for a summary of all database monitor data elements and monitoring groups, see the System Monitor Guide and Reference. |
Usage Notes
To obtain the status of the switches at the database manager level, call db2GetSnapshot - Get Snapshot, specifying SQMA_DB2 for OBJ_TYPE (get snapshot for database manager).
For detailed information about the use of the database monitor APIs, and for a summary of all database monitor data elements and monitoring groups, see the System Monitor Guide and Reference.
See Also
db2GetSnapshotSize - Estimate Size Required for db2GetSnapshot() Output Buffer
db2ResetMonitor - Reset Monitor.