Reason code 68 is already telling you this because of the lock timeout (deadlock is reason code 2). This may be due to the fact that other users making requests are using the same data that you are accessing at the same time, or your own multiple updates.
Start by running db2pd -db locktest -locks show detail from the db2 command line to find out where the locks are. Then you need to run something like:
select tabschema, tabname, tableid, tbspaceid from syscat.tables where tbspaceid = # and tableid = #
filling # characters with the identification number that you get from the output of the db2pd command.
Once you see where the locks are, here are some tips:
◦ The blocking frequency can sometimes be reduced by ensuring that all applications access their shared data in the same order, that is, for example, that they access (and therefore block) the rows in table A and then table B, and then table C, etc.
taken from: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.trb.doc/doc/t0055074.html
recommended reading: http://www.ibm.com/developerworks/data/library/techarticle/dm-0511bond/index.html
Addendum: if your servlet or other guilty application uses select statements found in a dead end, you can try adding with ur to the select statements if the accuracy of the updated (or inserted) data is not important.
brandong
source share