IBM Books

Administration Guide


Recovery of Indoubt DRDA Transactions

There are some differences in how indoubt DRDA transactions are recovered as a result of the type of communications environment used.

Recovery Using SNA Communications

Recovery of indoubt DRDA transactions at "downstream" DRDA 2 Application Servers (AS) is normally performed automatically by the Transaction Manager (TM) and the LU 6.2 Sync Point Manager (SPM) if in an SNA communications environment. An indoubt transaction at a DRDA 2 AS does not hold any resources at the local DB2 location but does hold resources at the AS as long the transaction is indoubt at the AS. If the AS determines that a heuristic decision must be made, then the AS administrator may contact the local DB2 database administrator (for example via telephone) in order to determine whether to commit or roll back the transaction at the AS. If this occurs, the LIST DRDA INDOUBT TRANSACTIONS command can be used to determine the state of the transaction at the local DB2. The following steps can be used as a guideline for most situations involving a SNA communications environment.

  1. Connect to the SPM as shown below.
    db2 => connect to db2spm
     
     Database Connection Information
     
     Database product       = SPM0500
     SQL authorization ID   = CRUS
     Local database alias   = DB2SPM
    
  2. Issue the LIST DRDA INDOUBT TRANSACTIONS command to display the indoubt transactions known to the SPM. The example below shows one indoubt transaction known to the SPM. The db_name is the local alias for the AS. The partner_lu is the fully qualified luname of the AS. This provides the best identification of the AS and should be provided by the caller from the AS. The luwid provides a unique identifier for a transaction and is available at all DRDA Application Servers. If the transaction in question is displayed, then the uow_status field can be used to determine the outcome of the transaction if the value is C (commit) or R (rollback).
    db2 => list drda indoubt transactions
     DRDA Indoubt Transactions:
     1.db_name: DBAS3    db_alias: DBAS3    role: AR
       uow_status: C  partner_status: I  partner_lu: USIBMSY.SY12DQA
     corr_tok: USIBMST.STB3327L
     luwid: USIBMST.STB3327.305DFDA5DC00.0001
     xid: 53514C2000000017 00000000544D4442 0000000000305DFD A63055E962000000
          00035F
    
  3. If an indoubt transaction for the partner_lu and for the luwid is not displayed, or if the LIST DRDA INDOUBT TRANSACTIONS command returns as follows:
    db2 => list drda indoubt transactions
    SQL1251W  No data returned for heuristic query.
    
    then the transaction was rolled back.

There is another unlikely but possible situation that may occur. If an indoubt transaction with the proper luwid for the partner_lu is displayed, but the uow_status is "I" then the SPM doesn't know whether the transaction is to be committed or rolled back. The XID displayed in the message can be used to determine the proper commit decision as described in the "Manual Recovery of Indoubt Transactions" section.

Recovery Using TCP/IP Communications

Recovery of indoubt DRDA transactions involving TCP/IP communications environment has some differences to that for indoubt transactions involving a SNA communications environment. When an indoubt transaction occurs in a TCP/IP communications environment, an alert entry is generated at the client, at the database server, and/or at the the Transaction Manager (TM) database depending on who detected the problem. The alert entry is placed in the db2alert.log file. For more information on alerts, see the Troubleshooting Guide manual.

The resynchronization of any indoubt transactions occurs automatically as soon as the TM and the participating databases and their connections are all available again.

It is also possible to use the LIST INDOUBT TRANSACTIONS WITH PROMPTING command to support the heuristic operations such as heuristic forget, commit, and roll back. Tools can be written using the Database Monitor GET SNAPSHOT API sqlmonss() and the Transaction Heuristic API sqlxhqry(), sqlxfrg(), sqlxhcom(), and sqlxhrol() to perform these heuristic operations. For more information on these two APIs, see the System Monitor Guide and Reference for the first API and the API Reference for the second.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]