在DB2 for z/OS中,其默认的lock level是page的,这样很容易引起死锁,我想知道如何改成row level的
方法1:通过新建Table Space指定locksize=row解决了这个问题
方法2:Page level locking has been existing for very long time, and this shold NOT be the main cause of deadlocks. You need to tune your applications and plan/package bind options.
For changing to row level locking, use SQL:
ALTER TABLESPACE dbname.tsname LOCKSIZE ROW;
And you need to rebind the related plan/packages.
对数据库中的PACKAGE进行重新联编,简单地,可以使用db2rbind命令来完成。
db2rbind命令的语法如下:
>>-db2rbind--database--/l logfile----+------+------------------->
'-all--'
.-conservative--.
>-----+-------------------------+--/r--+-any-----------+-------><
'-/u userid--/p password--'
例如,如果数据库名为SAMPLE,执行:
db2rbind sample -l db2rbind.out
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13165828/viewspace-607669/ ,如需转载,请注明出处,否则将追究法律责任。