Understanding transaction state information

The “state” column displays information about the current state of each transaction. At any given time, a local or external transaction may be executing a command, aborted, committed, and so forth. Additionally, distributed transactions can be in a prepared state, or can be heuristically completed or rolled back.

The “connection” column displays information about the state of the transaction’s connection. You can use this information to determine whether a transaction is currently attached to or detached from a process. Transactions in X/Open XA environments may become detached from their initiating process, in response to requests from the transaction manager.

See sp_transactions in the Reference Manual for a complete list and description of possible coordinator values.


Limiting sp_transactions output to specific states

You can use sp_transactions with the state keyword to limit output to the specified transaction state. For example:

sp_transactions "state", "Prepared"

displays information only for distributed transactions that have been prepared.