DB2 - Problem description
Problem IT24456 | Status: Closed |
LOCK EXCLUSIVE MDC TABLE WITH LOCKSIZE SET TO BLOCKINSERT, INSERTING ROWS WILL RESULT IN ADDITIONAL LOCKS BEING ACQUIRED. | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
Lock exclusive MDC table with LockSize set to BlockInsert, then inserting Rows with the same dimension value consecutively will result in additional rows locks being acquired on this MDC Table. The folllowing is a simple reproduction of this issue: ----- Begin repro.ksh ----- #!/bin/ksh export DB2OPTIONS="-ctv" dbName="wsdb" db2 "create db $dbName" db2 "connect to $dbName" db2 "create tablespace ts1" db2 "create table t1 (i1 int) organize by (i1) in ts1" db2 "alter table t1 locksize blockinsert" db2 +c "lock table t1 in exclusive mode" db2 +c "insert into t1 values 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" db2pd -db $dbName -locks echo db2 "commit" db2 "drop tablespace ts1" db2 "terminate" ----- End of repro.ksh ----- | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All Platforms * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v10.5 Fixpack 10 or later. * **************************************************************** | |
Local Fix: | |
A workaround to this problem is to set LockSize to either Table or Row before the INSERT command and set it back afterwards. I.e. db2 +c "lock table t1 in exclusive mode" db2 +c "alter table t1 locksize table" db2 +c "insert into t1 values 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" db2 +c "alter table t1 locksize blockinsert" db2pd -db $dbName -locks echo db2 "commit" | |
Solution | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : follow-up : IT24493 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 21.03.2018 16.07.2018 16.07.2018 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |