Resolving indoubt transactions

After a failure, the transaction manager, such as WebSphere® Application Server, is responsible for resolving indoubt transactions and for handling any failure recovery. Alternatively, you can manually resolve indoubt transactions.

Procedure

Begin general-use programming interface information.To manually resolve indoubt transactions:

  1. Display indoubt threads from the resource manager console with the following command:
     -DISPLAY THD(*) T(I) DETAIL 
    The command produces output like the following example:
    =dis thd(*) t(i) detail         
    DSNV401I  = DISPLAY THREAD REPORT FOLLOWS -         
    DSNV406I  = INDOUBT THREADS -         
    COORDINATOR               STATUS      RESET URID         AUTHID         
    ::FFFF:9.30.30.53..4007   INDOUBT           0000111F049A ADMF002         
     V437-WORKSTATION=jaijeetsvl, USERID=admf002,                
          APPLICATION NAME=db2jccmain         
     V440-XID=7C7146CE 00000014 00000021 F6EF6F8B                    
              F36873BE A37AC6BC 256F295D 04BE7EE0         
              8DFEF680 D1A6EFD5 8C0E6343 67679239         
              CC15A350 65BFB8EA 670CEBF4 E85938E0         
              06         
     V467-HAS LUWID G91E1E35.GFA7.00F962CC4611.0001=217         
     V466-THREAD HAS BEEN INDOUBT FOR    00:00:17         
    DISPLAY INDOUBT REPORT COMPLETE
    In this example, only one indoubt thread exists. A transaction is identified by a transaction identifier, called an XID. The first 4 bytes of the XID (in this case, 7C7146CE) identify the transaction manager. Each XID is associated with a logical unit of work ID (LUWID) at the Db2 server. Record the LUWID that is associated with each transaction, for use in the recovery step.
  2. Query the transaction manager to determine whether a commit or abort decision was made for each transaction.
  3. Based on the decision of the transaction manager, recover each indoubt thread from the resource manager console by either committing or aborting the transaction. Specify the LUWID from the DISPLAY THREAD command, which you recorded in step 1.
    Use one of the following commands:
     -RECOVER INDOUBT ACTION(COMMIT) LUWID(217) 
    -RECOVER INDOUBT ACTION(ABORT) LUWID(217) 
    These commands produce output like the following example:
    =RECOVER INDOUBT ACTION(COMMIT) LUWID(217)         
    DSNV414I  = THREAD         
    LUWID=G91E1E35.GFA7.00F962CC4611.0001=217 COMMIT         
    SCHEDULED         
    DSN9022I  = DSNVRI '-RECOVER INDOUBT' NORMAL COMPLETION
  4. Display indoubt threads again from the resource manager console with the following command:
     -DISPLAY THD(*) T(I) DETAIL
    This command produces output like the following example:
    =dis thd(*) t(i) detail         
    DSNV401I  = DISPLAY THREAD REPORT FOLLOWS -         
    DSNV406I  = INDOUBT THREADS -         
    COORDINATOR               STATUS      RESET URID         AUTHID
    ::FFFF:9.30.30.53..4007   COMMITTED-H     0000111F049A ADMF002
     V437-WORKSTATION=jaijeetsvl, USERID=admf002,         
          APPLICATION NAME=db2jccmain         
     V440-XID=7C7146CE 00000014 00000021 F6EF6F8B         
              F36873BE A37AC6BC 256F295D 04BE7EE0         
              8DFEF680 D1A6EFD5 8C0E6343 67679239         
              CC15A350 65BFB8EA 670CEBF4 E85938E0         
              06         
     V467-HAS LUWID G91E1E35.GFA7.00F962CC4611.0001=217         
    DISPLAY INDOUBT REPORT COMPLETE
    Notice that the transaction now appears as a heuristically committed transaction.
  5. If the transaction manager does not recover the indoubt transactions in a timely manner, reset the transactions from the resource manager console to purge the indoubt thread information. Specify the IP address and port that you identified from the DISPLAY THREAD command.
    -RESET INDOUBT IPADDR(::FFFF:9.30.30.53..4007) FORCE
    This command produces output like the following example:
    =RESET INDOUBT IPADDR(::FFFF:9.30.30.53..4007) FORCE         
    DSNL455I  = DB2 HAS NO INFORMATION RELATED TO         
    IPADDR 9.30.30.53:4007         
    DSNL454I  = QUALIFYING INDOUBT INFORMATION FOR         
    IPADDR 9.30.30.53:4007 HAS BEEN PURGED  

    End general-use programming interface information.