Hi there
we are getting the following db2 error on executeBatch() method that
inserts n rows on a table (where n is between 50 and 200).
[IBM][CLI Driver][DB2/NT] SQL0911N The current transaction has been
rolled back because of a deadlock or timeout. Reason code "2".
SQLSTATE=40001
errorCode : 911
Problem raises just when two or more people try to insert , at the
same time, on the table..
with one user there is no problem and the insert batch is perfectly
done by db2.
The batch java code is very simple:
connection = ds.getConnectio n("bla","bla" );
connection.setA utoCommit(false );
myStatement = connection .createStatemen t();
for(int i=0;i<inSqlComm and1.size();i++ ) {
myStatement.add Batch((String)i nSqlCommand1.ge t(i));
}
updateCounts = myStatement.exe cuteBatch();
if(Ok) connection.comm it();
else connection.roll back();
Any hints?
tnx
M.
we are getting the following db2 error on executeBatch() method that
inserts n rows on a table (where n is between 50 and 200).
[IBM][CLI Driver][DB2/NT] SQL0911N The current transaction has been
rolled back because of a deadlock or timeout. Reason code "2".
SQLSTATE=40001
errorCode : 911
Problem raises just when two or more people try to insert , at the
same time, on the table..
with one user there is no problem and the insert batch is perfectly
done by db2.
The batch java code is very simple:
connection = ds.getConnectio n("bla","bla" );
connection.setA utoCommit(false );
myStatement = connection .createStatemen t();
for(int i=0;i<inSqlComm and1.size();i++ ) {
myStatement.add Batch((String)i nSqlCommand1.ge t(i));
}
updateCounts = myStatement.exe cuteBatch();
if(Ok) connection.comm it();
else connection.roll back();
Any hints?
tnx
M.
Comment