"xixi" <da****@yahoo.com> wrote in message
news:c0**************************@posting.google.c om...
i am using db2 udb v8.1 on windows 64 bit
i am issue below query by doing
sqlStr = INSERT INTO NJIPD.OELTOHY8_OEFTOH VALUES (xx,xxx,xxx,
default)
insertStatement = conn.createStatement();
insertStatement.executeUpdate(sqlStr);
com.ibm.db2.jcc.a.SqlException: DB2 SQL error: SQLCODE: -911,
SQLSTATE: 40001, SQLERRMC: 68
somehow i get the record lock error
so why i just do the execute update and will this error happened?
thanks
I am not certain about your syntax because I am not proficient in Java or
C++ (not sure which you are using).
In general a -911 means that a deadlock or timeout has occurred while the
statement was attempting to obtain a lock on the object that is necessary
for an insert to occur. That means that some other process has a lock on the
object you need, and DB2 waiting for the lock to be released (wait time
determined by a DB2 pram that can be set) and finally gave up waiting and
terminated your transaction.
It is possible that another process has a row lock on the table or index
that your need, or the other process has a table lock (either taken
explicitly or escalated by DB2 from a row lock). Try to find out what other
locks are being held on that object.