Question & Answer
Question
Why does my DB2 online backup command fail and return the following error?
[]
"SQL0911N The current transaction has been rolled back because of a deadlock or timeout. Reason code "68". SQLSTATE=40001"[
]
Cause
A DB2® online backup tries to obtain a IN lock on all tables that reside in SMS table spaces. If the table has a BLOB field, DB2 tries to upgrade the table lock to an S lock. If an application currently executing on the server is also holding a lock on the table, the online backup can encounter a lock contention if its lock upgrade request is incompatible with the lock that the application holds on the table. When this happens, the online backup waits for the table to become available for the period of time specified by the LOCKTIMEOUT database configuration parameter. If the specified amount of time passes and the application is still holding its lock, the online backup fails.
You can find the table in question by looking for the following entry into the db2diag.log file:
Error upgrading lock.
PoolId: 45, ObjectId: 2, Intent: 3
Answer
This is expected behavior.
To resolve this problem, your have the following options:
- Identify the application that is holding the locks and force off that application
- Increase the LOCKTIMEOUT parameter
- Reschedule the online backup to avoid contention with lock intensive applications
- Change the tablespace type from SMS to DMS, as DMS will not need to acquire SHARE lock to read BLOB data.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21222153