再用命令中心查询数据时要注意,如果用了交互式查询数据,命令中心将会
给所查的记录加了 s 锁.这时如果要 update 记录,由于 update 要使用 x 锁,排
它锁,将会处于锁等待.
首先,将监视开关打开
db2 update dbm cfg using dft_mon_lock on
这是更改 instance 一级的参数,还可以使用 switch 只打开 session一级。
db2 update monitor switches using lock on
快照
db2 get snapshot for Locks on gtjazb >snap.log
tables
bufferpools
tablespaces
database
然后再看snap.log中的内容即可。
对 Lock可根据 Application handle(应用程序句柄)看每个应用程序
的锁的情况。
监视完毕后,不要忘了将监视器关闭
db2 update dbm cfg using dft_mon_lock off
本文由风哥教程整理发布,仅用于学习测试使用,转载注明出处:http://www.fgedu.net.cn/10327.html
