mon_locktimeout - Monitoring lock timeout configuration parameter

This parameter controls the generation of lock timeout events at the database level for the lock event monitor and affects all Db2® workload definitions.

Configuration type
Database
Parameter type
  • Configurable online
Default [minimum level of collection that is enabled for all workloads or service classes on the database]
NONE [NONE, WITHOUT_HIST, HISTORY, HIST_AND_VALUES ]

If you set this parameter to NONE, no lock timeout events will be generated unless lock timeout event collection is enabled on Db2 Workload objects using the COLLECT LOCK TIMEOUT DATA clause.

If you set the parameter to WITHOUT_HIST, the data about lock events are sent to any active locking event monitor when the lock event occurs. The data collected for the lock timeout event will not include a history of activities executed by the application waiting on the lock or the application holding the lock. Hence the text for the SQL statement which acquired the lock will not be captured.

If you set the parameter to HISTORY, the lock timeout event will include a history of activities executed by the application waiting on the lock and the application holding the lock. The history only includes activities executed in the current transaction for the application and will only report the newest activities executed if the maximum sized is reached. The default history size is 250. The history size can be configured using the DB2_MAX_INACT_STMTS registry variable.

If you set the parameter value to HIST_AND_VALUES, activity history collected with the lock timeout event will include the input data values for those activities that have them. These data values will not include LOB data, LONG VARCHAR data, LONG VARGRAPHIC data, structured type data, or XML data. For SQL statements compiled using the REOPT ALWAYS bind option, there will be no REOPT compilation or statement execution data values provided in the event information.

This parameter controls the collection of lock timeout events at the database level for the lock event monitor. The mon_locktimeout parameter determines whether or not a lock timeout event will be collected by the lock event monitor when an application times out waiting on a lock.

The mon_locktimeout parameter value represents a minimum level of collection that is enabled for all Db2 applications. The collection of lock timeout events can be enabled for a subset of Db2 applications using the COLLECT LOCK TIMEOUT DATA clause on a Db2 Workload object instead of the mon_locktimeout parameter.

When individual Db2 workloads specify a higher level of collection than the configuration parameter, the Db2 workload setting is used instead of the configuration parameter value. You should note that system applications do not run in a workload and so the mon_locktimeout parameter is the only way for system applications to collect lock timeout data.