DB2 Version 9.7 for Linux, UNIX, and Windows

stmt_pkgcache_id - Statement package cache identifier monitor element

This element shows the internal package cache identifier (ID) for a dynamic SQL statement.

Table 1. Table Function Monitoring Information
Table Function Monitor Element Collection Level
MON_GET_ACTIVITY_DETAILS table function - Get complete activity details (reported in DETAILS XML document) Always collected
MON_GET_PKG_CACHE_STMT table function - Get SQL statement activity metrics in the package cache Always collected
MON_GET_PKG_CACHE_STMT_DETAILS table function - get detailed metrics for package cache entries Always collected
Table 2. Snapshot Monitoring Information
Snapshot Level Logical Data Grouping Monitor Switch
Dynamic SQL dynsql Basic
Table 3. Event Monitoring Information
Event Type Logical Data Grouping Monitor Switch
Locking - -
Deadlocks with Details History Values1 event_stmt_history -
Deadlocks with Details History1 event_stmt_history -
Activities event_activitystmt -
Package cache - COLLECT BASE DATA
1
This option has been deprecated. Its use is no longer recommended and might be removed in a future release. Use the CREATE EVENT MONITOR FOR LOCKING statement to monitor lock-related events, such as lock timeouts, lock waits, and deadlocks.

Usage

In a multi-partitioned environment, each partition has a unique statement ID for a cached statement. A given statement may not have the same ID across partitions.

In a global dynamic SQL snapshot, only the first statement ID is returned.