SNAP_GET_BP_V95 table function - Retrieve bufferpool logical group snapshot information
The SNAP_GET_BP_V95 table function returns information about buffer pools from a bufferpool snapshot, in particular, the bufferpool logical data group.
Refer to Table 1 for a complete list of information that can be returned.
Syntax
The schema is SYSPROC.
Table function parameters
-
dbname
- An input argument of type VARCHAR(128) that specifies a valid database name in the same instance as the currently connected database. Specify a database name that has a directory entry type of either "Indirect" or "Home", as returned by the LIST DATABASE DIRECTORY command. Specify an empty string to take the snapshot from the currently connected database. Specify a NULL value to take the snapshot from all databases within the same instance as the currently connected database. 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 dbname is not set to NULL and member is set to NULL, -1 is set implicitly for member. If this input option is not used, that is, only dbname is provided, data is 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 both dbname and member are 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_BP_V95 table function takes a snapshot for the currently connected database and database member number.
Authorization
- EXECUTE privilege on the SNAP_GET_BP_V95 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 SUBSTR(T.DB_NAME,1,10) AS DB_NAME, SUBSTR(T.BP_NAME,1,20) AS BP_NAME, (T.POOL_DATA_L_READS+T.POOL_INDEX_L_READS) AS TOTAL_LOGICAL_READS, (T.POOL_DATA_P_READS+T.POOL_INDEX_P_READS) AS TOTAL_PHYSICAL_READS, T.DBPARTITIONNUM FROM TABLE(SNAP_GET_BP_V95(CAST(NULL AS VARCHAR(128)), -1)) AS TDB_NAME BP_NAME TOTAL_LOGICAL_READS ...
---------- ------------...- -------------------- ...
SAMPLE IBMDEFAULTBP 0 ...
TOOLSDB IBMDEFAULTBP 0 ...
TOOLSDB BP32K0000 0 ...
3 record(s) selected.
... TOTAL_PHYSICAL_READS DBPARTITIONNUM
... -------------------- --------------
... 0 0
... 0 0
... 0 0
