配置过程:
db2 " connect to edwdb "
db2 " update db cfg using MON_LOCKTIMEOUT HIST_AND_VALUES MON_DEADLOCK HIST_AND_VALUES MON_LOCKWAIT HIST_AND_VALUES MON_LW_THRESH 10000000 "
db2 " create event monitor lockevm for locking write to unformatted event table "
db2 " set event monitor lockevm state 1 "
解析语句:
/db2home/db2iedw/sqllib/java/jdk64/bin/java db2evmonfmt -d edwdb -ue db2iedw.lockevm -ftext -u db2iedw -p db2iedw -hours 24 >> /tmp/lockevent.20190227.out
lockevent.20190227.out里面信息(例):
Event ID : 142
Event Type : LOCKWAIT
Event Timestamp : 2019-02-27-11.05.16.068336
Partition of detection : 23
Participant No 1 requesting lock
Lock Name : 0x0600000000000000000000004F
Lock wait start time : 2019-02-27-11.05.06.069569
Lock wait end time : 2019-02-27-11.05.24.258032
Lock Type : OBJECT_TABLE
Lock Specifics :
Lock Attributes : 00200000
Lock mode requested : Share
Lock mode held : Intent Exclusive
Lock Count : 0
Lock Hold Count : 0
Lock rrIID : 0
Lock Status : Granted
Lock release flags : 00000000
Tablespace TID : 6
Tablespace Name : USERDATA
Table FID :
Table Schema :
Table Name :
1wxcgn1f94w
Current Activities of Participant No 1
Activities not available
Past Activities of Participant No 1
Activities not available
Current Activities of Participant No 2
Activities not available
Past Activities of Participant No 2
Activities not available
收起