Deadlock during concurrent update

Deadlock during concurrent update

 

  

Dear all,

I have run a series of load test with 80 users in a web application. Some
user can't login to the application with
the deadlock error :

:[IBM][CLI Driver][DB2/NT] SQL0911N The current transaction has been
rolled back because of a deadlock or timeout. Reason code "2".
SQLSTATE=40001

I found that in the java application code:

strQuery = "UPDATE USER_LOGIN SET my_timestamp_type_column = CURRENT
TIMESTAMP, my_int_column = 0 WHERE USER_LOGIN_ID = ?";
....
prepareStatement(strQuery);
myStmt.setString(1, strUserId);
...
iUpdated = myStmt.executeUpdate(); //Deadlock error occured during
concurrent test.


Any constructive solution for that problem?

Many thanks.

Rgds,
John

DB2 & UDB email list listserv db2-l LazyDBA home page