Deadlock error SQL0911 RC=2 when importing documents or replicating to a target resource manager

A deadlock error that occurs when importing documents or replicating could be related to the RMTRACKING table.

Symptom

When importing documents or replicating to a target resource manager, error messages like the following messages display in the icmrm resource manager application. The messages show a deadlock during a store request.
ICMRM:DEBUG   2004-05-07 10:28:17,403  
[Servlet.Engine.Transports:2611] - server id : 3
- java(?:?)
ICMRM:TRACE   2004-05-07 10:28:17,403
  [Servlet.Engine.Transports:2611] - 
endtrans processing txid 2004-05-07-14.25.35.343610 - java(?:?)
ICMRM:DEBUG   2004-05-07 10:28:17,404 
 [Servlet.Engine.Transports:2611] - endTransTx try 0 - java(?:?)
ICMRM:ERROR   2004-05-07 10:29:21,808  
[Servlet.Engine.Transports:2611] - COM.ibm.db2.jdbc.DB2Exception:
 [IBM][CLI Driver][DB2/6000] SQL0911N  The current 
transaction has been rolled back because of a deadlock
 or timeout.  Reason code "2".  SQLSTATE=40001
 - java(?:?)
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000]
 SQL0911N  The current transaction has been rolled back
 because of a deadlock or timeout.  Reason code "2".
  SQLSTATE=40001

Cause

There is a deadlock in the resource manager database in the RMTRACKING table.

Action

You must have the DB2_RR_TO_RS=YES registry variable set in Db2®.
  1. From a Db2 command prompt, enter the following command: db2set DB2_RR_TO_RS=YES.
  2. Restart Db2:
    db2stop force
    db2start