Collects database manager monitor information and returns it to a user-allocated data buffer. The information returned represents a snapshot of the database manager operational status at the time the API was called.
Scope
This API returns information only for the node on which it is issued.
Authorization
One of the following:
Required Connection
Instance or database:
To obtain a snapshot from a remote instance (or a different local instance), it is necessary to first attach to that instance.
Version
db2ApiDf.h
C API Syntax
/* File: db2ApiDf.h */
/* API: Get Snapshot */
/* ... */
int db2GetSnapshot (
unsigned char version,
db2GetSnapshotData * data,
struct sqlca * pSqlca);
typedef struct
{
sqlma * piSqlmaData;
sqlm_collected * poCollectedData;
void * poBuffer;
db2Uint32 iVersion;
db2Uint32 iBufferSize;
db2Uint32 iStoreResult
} db2GetSnapshotData;
/* ... */
|
Generic API Syntax
/* File: db2ApiDf.h */
/* API: Get Snapshot */
/* ... */
int db2GetSnapshot (
unsigned char version,
db2GetSnapshotData * data,
struct sqlca * pSqlca);
typedef struct
{
sqlma * piSqlmaData;
sqlm_collected * poCollectedData;
void * poBuffer;
db2Uint32 iVersion;
db2Uint32 iBufferSize;
db2Uint32 iStoreResult
} db2GetSnapshotData;
/* ... */
|
API Parameters
| Note: | This structure is only used for pre-Version 6 data streams. However, if a snapshot call is made to a back-level remote server, this structure must be passed in for results to be processed. It is therefore recommended that this parameter always be passed in. |
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. |
Usage Notes
If an alias for a database residing at a different instance is specified, an error message is returned.
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
sqlmon - Get/Update Monitor Switches
sqlmonsz - Estimate Size Required for sqlmonss() Output Buffer