Command Reference

LIST INDOUBT TRANSACTIONS

Provides a list of transactions that are indoubt. The user can interactively commit, roll back, or forget the indoubt transactions.

The two-phase commit protocol comprises:

  1. The PREPARE phase, in which the resource manager writes the log pages to disk, so that it can respond to either a COMMIT or a ROLLBACK primitive
  2. The COMMIT (or ROLLBACK) phase, in which the transaction is actually committed or rolled back.

An indoubt transaction is one which has been prepared, but not yet committed or rolled back.

Scope

This command returns a list of indoubt transactions on the executed node.

Authorization

dbadm

Required Connection

Database. If implicit connect is enabled, a connection to the default database is established.

Command Syntax

>>-LIST INDOUBT TRANSACTIONS--+----------------+---------------><
                              '-WITH PROMPTING-'
 

Command Parameters

WITH PROMPTING
Indicates that indoubt transactions are to be processed. If this parameter is specified, an interactive dialog mode is initiated, permitting the user to commit, roll back, or forget indoubt transactions. If this parameter is not specified, indoubt transactions are written to the standard output device, and the interactive dialog mode is not initiated.

Interactive dialog mode permits the user to:

Note:A blank space must separate the command letter from its argument.

Before a transaction is committed, rolled back, or forgotten, the transaction data is displayed, and the user is asked to confirm the action.

Examples

The following is sample dialog generated by LIST INDOUBT TRANSACTIONS:

 
 
In-doubt Transactions for Database SAMPLE
 
1.   originator: XA
     appl_id: *LOCAL.DB2.95051815165159       sequence_no: 0001  status: i
timestamp: 05-18-1997 16:51:59 auth_id: SMITH  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F93DD A92F8C4FF3000000
0000BD
 
2.   originator: XA
     appl_id: *LOCAL.DATABASE.950407161043  sequence_no: 0002  status: i
timestamp: 04-07-1997 16:10:43  auth_id: JONES  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F95FE B62F8C4FF3000000
0000C1
   .
   .
   .
 
Enter in-doubt transaction command or 'q' to quit.
e.g. 'c 1' heuristically commits transaction 1.
c/r/f/l/q: c 1
 
1.   originator: XA
     appl_id: *LOCAL.DB2.95051815165159       sequence_no: 0001  status: i
timestamp: 05-18-1997 16:51:59 auth_id: SMITH  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F93DD A92F8C4FF3000000
0000BD
 
Do you want to heuristically commit this in-doubt transaction ? (y/n) y
 
DB20000I "COMMIT INDOUBT TRANSACTION" completed successfully
 
c/r/f/l/q: c 5
 
DB20030E "5" is not a valid in-doubt transaction number.
 
c/r/f/l/q: l
 
In-doubt Transactions for Database SAMPLE
 
1.   originator: XA
     appl_id: *LOCAL.DB2.95051815165159       sequence_no: 0001  status: c
timestamp: 05-18-1997 16:51:59 auth_id: SMITH  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F93DD A92F8C4FF3000000
0000BD
 
2.   originator: XA
     appl_id: *LOCAL.DATABASE.950407161043  sequence_no: 0002  status: i
timestamp: 04-07-1997 16:10:43  auth_id: JONES  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F95FE B62F8C4FF3000000
0000C1
   .
   .
   .
c/r/f/l/q: r 2
 
2.   originator: XA
     appl_id: *LOCAL.DATABASE.950407161043  sequence_no: 0002  status: i
timestamp: 04-07-1997 16:10:43  auth_id: JONES  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F95FE B62F8C4FF3000000
0000C1
 
Do you want to heuristically rollback this in-doubt transaction ? (y/n) y
 
DB20000I "ROLLBACK INDOUBT TRANSACTION" completed successfully
 
c/r/f/l/q: l 2
 
2.   originator: XA
     appl_id: *LOCAL.DATABASE.950407161043  sequence_no: 0002  status: r
timestamp: 04-07-1997 16:10:43  auth_id: JONES  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F95FE B62F8C4FF3000000
0000C1
 
c/r/f/l/q: f 2
 
2.   originator: XA
     appl_id: *LOCAL.DATABASE.950407161043  sequence_no: 0002  status: r
timestamp: 04-07-1997 16:10:43  auth_id: JONES  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F95FE B62F8C4FF3000000
0000C1
  
Do you want to forget this in-doubt transaction ? (y/n) y
 
DB20000I "FORGET INDOUBT TRANSACTION" completed successfully
 
c/r/f/l/q: l 2
 
2.   originator: XA
     appl_id: *LOCAL.DATABASE.950407161043  sequence_no: 0002  status: f
timestamp: 04-07-1997 16:10:43  auth_id: JONES  log_full: n type: RM
xid: 53514C2000000017 00000000544D4442 00000000002F95FE B62F8C4FF3000000
0000C1
 
c/r/f/l/q: q
 
Note:The LIST INDOUBT TRANSACTIONS command returns type information to show the role of the database in each indoubt transaction:

TM
Indicates the indoubt transaction is using the database as a transaction manager database.

RM
Indicates the indoubt transaction is using the database as a resource manager, meaning that it is one of the databases participating in the transaction, but is not the transaction manager database.

Usage Notes

An indoubt transaction is a global transaction that was left in an indoubt state. This occurs when either the Transaction Manager (TM) or at least one Resource Manager (RM) becomes unavailable after successfully completing the first phase (that is, the PREPARE phase) of the two-phase commit protocol. The RMs do not know whether to commit or to roll back their branch of the transaction until the TM can consolidate its own log with the indoubt status information from the RMs when they again become available. For more information, see the chapter on using DB2 with an XA-compliant Transaction Manager in the Administration Guide. An indoubt transaction can also exist in an MPP environment. For more information, see the section on transaction failure recovery on failed database partition servers (in the Administration Guide).

If LIST INDOUBT TRANSACTIONS is issued against the currently connected database, the command returns the information on indoubt transactions in that database.

Only transactions whose status is indoubt (i), or missing commit acknowledgement (m), can be committed.

Only transactions whose status is indoubt (i) or ended (e) can be rolled back.

Only transactions whose status is committed (c) or rolled back (r) can be forgotten.
Note:In the commit phase of a two-phase commit, the coordinator node waits for commit acknowledgements. If one or more nodes do not reply (for example, because of node failure), the transaction is placed in missing commit acknowledgement state.

Indoubt transaction information is valid only at the time that the command is issued. Once in interactive dialog mode, transaction status may change because of external activities. If this happens, and an attempt is made to process an indoubt transaction which is no longer in an appropriate state, an error message is displayed.

After this type of error occurs, the user should quit (q) the interactive dialog and reissue the LIST INDOUBT TRANSACTIONS WITH PROMPTING command to refresh the information shown.

For more information, see the Administration Guide.


[ Top of Page | Previous Page | Next Page ]