Db2 SQL0911N: The current transaction has been rolled back because of a deadlock or timeout (reason code 68)
Db2 rolled the transaction back because it hit a lock timeout (68) or a deadlock (2).
SQL0911N The current transaction has been rolled back because of a deadlock or timeoutSQLCODE=-911, SQLSTATE=40001DB2 deadlock or timeout reason code 68SQL0911N reason code "68"SQLCODE: -911 Meaning
Read the reason code: 68 = lock timeout (LOCKTIMEOUT), 2 = deadlock. Retry the transaction, keep it short, access objects in a consistent order, add indexes to reduce locked rows, and consider currently committed semantics / isolation level changes.
Common causes
- Long transaction holding locks (reason code 68)
- Deadlock between two applications (reason code 2)
- Missing index causing table scans
- LOCKTIMEOUT too low
- Uncommitted work in another session
⚡ Quick fix
- Retry on SQL0911N
- Keep transactions short and commit sooner
- Find the blocker with
MON_GET_LOCKS/db2pd -locks
Detailed fix by platform
Shell
- sql
db2 get db cfg | grep -i locktimeout db2pd -db SAMPLE -locks
How to diagnose
- Reason code — 2 or 68?
- Blocker — Which app?
- LOCKTIMEOUT — Value?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in SQL
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026