Hi ,
I am trying to acquire a lock on a table A in exclusive mode, and this
statement gives an error indicating a deadlock or timeout
has been detected. The lock timeout value is set to 0 which I understand
is to wait for however long it takes to acquire a lock.
Also there are other processes that have acquired row level exclusive
locks on the table A when this error happened.Is DB2
throwing this error as a pre-emptive measure.
I was expecting that the lock table A in exclusive mode statement would
be a blocking call. Any thoughts?
Thanks,
Sumanth
Logs:
lock table Schema.A in exclusive mode ;
ERROR: CLI execute 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