SQLSTATE 57033: Deadlock or timeout occurred without automatic rollback.
If app A waits for app B to release a lock and app B waits for app A to release a lock, and neither of them can progress without the lock held by the other, DB2 decides at random to '57033' one of them, thereby allowing the other to complete ... The interval between deadlock checks is defined using db cfg DLCHKTIME- default 10000 milliseconds
If app A waits for app B to release a lock, then app A waits for app B to release the lock for LOCKTIMEOUT (db cfg parm) milliseconds ... In this case, app B is not dependent on locks held by app A ... By default, app A will wait for indefinite period (-1) ....
If you have not changed any of the db cfg parameters I mentioned above, then you application(s) are deadlocking ...
You can define an event monitor to capture the deadlock ...
Steps to define and use an event monitor :
1) Define event monitor - Check SQL Reference for correct syntax
CREATE EVENT MONITOR DLMON FOR DEADLOCK WRITE TO 'C:\abcd\'
2) Activate the monitor
SET EVENT MOINTOR EVMON STATE 1
3) Allow it to run till you come across a deadlock
4) Stop Event Monitor
SET EVENT MOINTOR EVMON STATE 0
5) Use db2evmon command to format the monitor's output - Refer Command Reference for details
db2evmon -d sample dlmon
Originally posted by bsa_java
I am working on J2EE web application with,
2.DB2 7.1 with fixpack 7 as backend.
Platform : AIX 5.1
I do have some database operations in my application.
But the problem is that sometimes i get SQL Exception due to "SQLSTATE=57033".
Can anybody help me? Why this is happening?
Thanks in advance.
Visit the new-look IDUG Website , register to gain access to the excellent content.