onstat -x command: Print database server transaction information
Use the onstat -x command to display transaction information on the database server.
The transaction information is required only in the following
situations:
- X/Open environment
- Database server participation in distributed queries
- Database server uses the Microsoft™ Transaction Server (MTS) transaction manager
Example output
Output description
You can interpret output
from the onstat -x command as follows:
- address
- The shared-memory address of the transaction structure
- flags
- The 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
The flag codes for position 2 (transaction mode):- T
- Tightly-coupled mode (MTS)
- L
- Loosely-coupled mode (default mode)
The 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
The flag code for position 4:- X
- XA transaction
The 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
- userthread
- The thread that owns the transaction (rstcb address)
- locks
- The number of locks that the transaction holds
- begin logpos
- The position within the log when the BEGIN WORK record was logged.
- current logpos
- The current log position of the most recent record that the transaction is wrote too (As a transaction rolls back, the current log position will actually wind back until it gets to the beginning log position. When the beginning log position is reached, the rollback is complete.)
- isol
- The isolation level.
- est. rb time
- The estimated time the server needs to rollback the transaction. As a transaction goes forward, this time increases. If a transaction rolls back, the time decreases as the transaction unwinds.
- retrys
- Are the attempts to start a recovery thread for the distributed query
- coord
- The name of the transaction coordinator when the subordinate is
executing the transaction
This field tells you which database server is coordinating the two-phase commit.
The last line of the onstat -x command
output indicates that
8
is the maximum number of
concurrent transactions since you initialized the database server.
8 active, 128 total, 8 maximum concurrent