IBM Support

DB2 online backup fails with SQL0911N reason code 68

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.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Recovery - Backup","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8;7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21222153