db2ResetMonitor API - Reset the database system monitor data
Resets the database system monitor data of a specified database, or of all active databases, for the application issuing the call.
Scope
This API can either affect a given database partition on the instance, or all database partitions on the instance.
Authorization
- SYSADM
- SYSCTRL
- SYSMAINT
- SYSMON
Required connection
Instance. If there is no instance attachment, a default instance attachment is created.
To reset the monitor switches for a remote instance (or a different local instance), it is necessary to first attach to that instance.
API include file
db2ApiDf.h
API and data structure syntax
SQL_API_RC SQL_API_FN
db2ResetMonitor (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2ResetMonitorData
{
db2Uint32 iResetAll;
char *piDbAlias;
db2Uint32 iVersion;
db2int32 iNodeNumber;
} db2ResetMonitorData;
SQL_API_RC SQL_API_FN
db2gResetMonitor (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2gResetMonitorData
{
db2Uint32 iResetAll;
char *piDbAlias;
db2Uint32 iDbAliasLength;
db2Uint32 iVersion;
db2int32 iNodeNumber;
} db2gResetMonitorData;
db2ResetMonitor API parameters
- versionNumber
- Input. Specifies the version and release level of the structure passed as the second parameter pParmStruct.
- pParmStruct
- Input. A pointer to the db2ResetMonitorData structure.
- pSqlca
- Output. A pointer to the sqlca structure.
db2ResetMonitorData data structure parameters
- iResetAll
- Input. The reset flag.
- piDbAlias
- Input. A pointer to the database alias.
- iVersion
- Input. Version ID of the database monitor data to collect. The database monitor only returns
data that was available for the requested version. Set this parameter to one of the following
symbolic constants:
- SQLM_DBMON_VERSION1
- SQLM_DBMON_VERSION2
- SQLM_DBMON_VERSION5
- SQLM_DBMON_VERSION5_2
- SQLM_DBMON_VERSION6
- SQLM_DBMON_VERSION7
- SQLM_DBMON_VERSION8
- SQLM_DBMON_VERSION9
- SQLM_DBMON_VERSION9_5
Note: If SQLM_DBMON_VERSION1 is specified as the version, the APIs cannot be run remotely.Note: Constants SQLM_DBMON_VERSION5_2, and earlier, are deprecated and may be removed in a future release of Db2®. - iNodeNumber
- Input. The database partition server where the request is to be
sent. Based on this value, the request will be processed for the
current database partition server, all database partition servers
or a user specified database partition server. Valid values are:
- SQLM_CURRENT_NODE
- SQLM_ALL_NODES
- node value
Note: For stand-alone instances the value, SQLM_CURRENT_NODE, must be used.
db2gResetMonitorData data structure specific parameters
- iDbAliasLength
- Input. Specifies the length in bytes of the piDbAlias parameter.
Usage notes
Each process (attachment) has its own private view of the monitor data. If one user resets, or turns off a monitor switch, other users are not affected. When an application first calls any database monitor function, it inherits the default switch settings from the database manager configuration file. These settings can be overridden with db2MonitorSwitches - Get/Update Monitor Switches.
If all active databases are reset, some database manager information is also reset to maintain the consistency of the data that is returned.
This API cannot be used to selectively reset specific data items or specific monitor groups. However, a specific group can be reset by turning its switch off, and then on, using db2MonitorSwitches - Get/Update Monitor Switches.