SNAPDBM administrative view and SNAP_GET_DBM table function - Retrieve the dbm logical grouping snapshot information
The SNAPDBM administrative view and the SNAP_GET_DBM table function return the snapshot monitor database manager (dbm) logical grouping information.
SNAPDBM administrative view
Used with the SNAPSWITCHES administrative view and the MON_GET_FCM, MON_GET_MEMORY_SET, MON_GET_MEMORY_POOL table functions, the SNAPDBM administrative view provides the data equivalent to the GET SNAPSHOT FOR DBM command.
The schema is SYSIBMADM.
Refer to Table 1 for a complete list of information that can be returned.
Authorization
- SELECT privilege on the SNAPDBM administrative view
- CONTROL privilege on the SNAPDBM administrative view
- DATAACCESS authority
- DBADM authority
- SQLADM authority
- ACCESSCTRL authority
- SECADM authority
- EXECUTE privilege on the SNAP_GET_DBM table function
- DATAACCESS authority
- DBADM authority
- SQLADM authority
- SYSMON
- SYSCTRL
- SYSMAINT
- SYSADM
Default PUBLIC privilege
In a non-restrictive database, SELECT privilege is granted to PUBLIC when the view is automatically created.
Example
SELECT DB2_STATUS, DB2START_TIME, LAST_RESET, LOCAL_CONS, REM_CONS_IN,
(AGENTS_CREATED_EMPTY_POOL/AGENTS_FROM_POOL) AS AGENT_USAGE,
DBPARTITIONNUM FROM SYSIBMADM.SNAPDBM ORDER BY DBPARTITIONNUM
DB2_STATUS DB2START_TIME LAST_RESET ...
------------ -------------------------- ----------...- ...
ACTIVE 2006-01-06-14.59.59.059879 - ...
ACTIVE 2006-01-06-14.59.59.097605 - ...
ACTIVE 2006-01-06-14.59.59.062798 - ...
3 record(s) selected. ...
... LOCAL_CONS REM_CONS_IN AGENT_USAGE DBPARTITIONNUM
... ----------...- -----------...- -----------...- --------------
... 1 1 0 0
... 0 0 0 1
... 0 0 0 2
SNAP_GET_DBM table function
The SNAP_GET_DBM table function returns the same information as the SNAPDBM administrative view, but allows you to retrieve the information for a specific database member, aggregate of all database members or all database members.
Used with the SNAP_GET_DBM_MEMORY_POOL, SNAP_GET_FCM, SNAP_GET_FCM_PART and SNAP_GET_SWITCHES table functions, the SNAP_GET_DBM table function provides the data equivalent to the GET SNAPSHOT FOR DBM command.
Refer to Table 1 for a complete list of information that can be returned.
Syntax
The schema is SYSPROC.
Table function parameter
-
member
- An optional input argument of type INTEGER that specifies a valid database member number. Specify -1 for the current database member, or -2 for an aggregate of all active database members. If this input option is not used, data will be returned from all active database members. An active database member is a member where the database is available for connection and use by applications.
If member is set to NULL, an attempt is made to read data from the file created by SNAP_WRITE_FILE procedure. Note that this file could have been created at any time, which means that the data might not be current. If a file with the corresponding snapshot API request type does not exist, then the SNAP_GET_DBM table function calls the snapshot from memory.
Authorization
- EXECUTE privilege on the SNAP_GET_DBM table function
- DATAACCESS authority
- SYSMON
- SYSCTRL
- SYSMAINT
- SYSADM
Default PUBLIC privilege
In a non-restrictive database, EXECUTE privilege is granted to PUBLIC when the function is automatically created.
Example
SELECT DB2START_TIME, DB2_STATUS FROM TABLE(SNAP_GET_DBM(2)) AS T
DB2START_TIME DB2_STATUS
-------------------------- ------------
2006-01-06-14.59.59.062798 ACTIVE