DB2 Version 9.7 for Linux, UNIX, and Windows

sqlxphrl API - Roll back an indoubt transaction

Rolls back an indoubt transaction (that is, a transaction that has been prepared). If the operation succeeds, the transaction's state becomes heuristically rolled back.

Scope

This API only affects the node on which it is issued.

Authorization

None

Required connection

Database

API include file

sqlxa.h

API and data structure syntax

extern int SQL_API_FN sqlxphrl(
   int exe_type,
   SQLXA_XID *pTransId,
   struct sqlca *pSqlca
   );

sqlxphrl API parameters

exe_type
Input. If EXE_THIS_NODE is specified, the operation is executed only at this node.
pTransId
Input. XA identifier of the transaction to be heuristically rolled back.
pSqlca
Output. A pointer to the sqlca structure.

Usage notes

Only transactions with a status of prepared or idle can be rolled back. Once heuristically rolled back, the database manager remembers the state of the transaction until the sqlxhfrg API is called.