onstat -G command: Print TP/XA transaction information

Use the onstat -G command to display information about global transactions generated through the TP/XA library.

Figure 1: Syntax:

1  onstat   -G

Example output

Figure 2: onstat -G command output
Global Transaction Identifiers
address    flags  isol    timeout  fID       gtl  bql  data      dbpartnum
45cb0318   -LH-G  COMMIT  0        4478019   2    2    30323032  100163
For a tightly coupled transaction, all branches share the same transaction address shown in the address column.

Output description

address
Transaction address
flags
Flag codes for position 1 (current transaction state):
A
User thread attached to the transaction
S
TP/XA suspended transaction
C
TP/XA waiting for rollback
Flag codes for position 2 (transaction mode):
T
Tightly-coupled mode (MTS)
L
Loosely-coupled mode (default mode)
Flag codes for position 3 (transaction stage):
B
Begin work
P
Distributed query prepared for commit
X
TP/XA prepared for commit
C
Committing or committed
R
Rolling back or rolled back
H
Heuristically rolling back or rolled back
Flag code for position 4:
X
XA data source global transaction
Flag codes for position 5 (type of transaction):
G
Global transaction
C
Distributed query coordinator
S
Distributed query subordinate
B
Both distributed query coordinator and subordinate
M
Redirected global transaction
isol
Transaction isolation level
timeout
Transaction lock timeout
fID
Format ID
gtl
Global transaction ID length
bql
Branch qualifier length
data
Transaction-specific data
dbpartnum
Database identifier of where the transaction starts