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 or database:
To display the settings for a remote instance, or for a different local instance, it is necessary to first attach to that instance.
Version
sqlmon.h
C API Syntax
/* File: sqlmon.h */
/* API: Get/Update Monitor Switches */
/* ... */
int SQL_API_FN
sqlmon (
unsigned long version,
_SQLOLDCHAR *reserved,
sqlm_recording_group group_states[],
struct sqlca *sqlca);
/* ... */
|
Generic API Syntax
/* File: sqlmon.h */
/* API: Get/Update Monitor Switches */
/* ... */
int SQL_API_FN
sqlgmon (
unsigned long reserved_lgth,
struct sqlca *sqlca,
sqlm_recording_group group_states[],
_SQLOLDCHAR *reserved,
unsigned long version);
/* ... */
|
API Parameters
The array contains the following elements:
For more information about the sqlm_recording_group structure, see SQLM-RECORDING-GROUP, or the System Monitor Guide and Reference.
If requesting data for a version higher than the current server, the database monitor only returns data for its level (see the server_version field in the "collected" portion of the data stream.
| Note: | If SQLM_DBMON_VERSION1 is specified as the version, the APIs cannot be run remotely. |
Sample Programs
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
sqlmonsz - Estimate Size Required for sqlmonss() Output Buffer