ttXactAdmin
The ttXactAdmin
utility lists ownership, status, log and lock information for each outstanding transaction. It also enables you to heuristically commit, terminate or forget an XA transaction branch.
Applications should monitor log holds and the accumulation of log files. For more information, see Monitoring Accumulation of Transaction Log Files in the Oracle TimesTen In-Memory Database Operations Guide.
Required Privilege
This utility requires various privileges depending on which options are entered on the command line. See the description of the options to determine which privilege is needed, if any.
Usage in TimesTen Scaleout and TimesTen Classic
This utility is supported in TimesTen Classic but not supported in TimesTen Scaleout.
Syntax
ttXactAdmin {-h | -help | -?} ttXactAdmin {-V | -version} ttXactAdmin [-v verbosity] [-mt maxTrans] [-ml maxLocks] [-pid pid] [-xact xid] [-tbl
[owner.]tableName]
[-interval seconds] [-count iterations] {DSN | -connstr connection_string} ttXactAdmin -latch [-interval seconds] [-count iterations] {DSN | -connstr connection_string} ttXactAdmin -latch [-interval seconds] [-count iterations] {DSN | -connstr connection_string} ttXactAdmin -connections [-pid pid] [-interval seconds] [-count iterations] {DSN | -connstr connection_string} ttXactAdmin -xactIdRollback xid {DSN | -connstr connection_string} ttXactAdmin -XactIdCommit xid ttXactAdmin {-HCommit xid | -HAbort xid | -HForget xid} {DSN | -connstr connection_string}
Options
ttXactAdmin
has the options:
Option | Description |
---|---|
|
Shows all current connections to the database. When run with the This option requires |
|
An ODBC connection string that specifies a database location, driver, and optionally other connection attribute settings. |
|
Generate the report iterations times. If no |
|
Indicates the ODBC data source name of the database to be administered. This option requires |
|
Prints a usage message and exits. |
|
Heuristically terminates an XA transaction branch in TimesTen. The specified transaction ID must be the local TimesTen TransID. This option requires |
|
Heuristically commit an XA transaction branch in TimesTen. The specified transaction ID must be the local TimesTen TransID. This option requires |
|
Heuristically forget an XA transaction branch in TimesTen. The specified transaction ID must be the local TimesTen TransID. This option requires |
|
Repeat the generation of the report, pausing the indicated number of seconds between each generation. If no |
|
This option is to be used by TimesTen Customer Support only. Shows only the latch information for the database specified. |
|
Maximum number of locks per transaction. Default is 6000. |
|
Specifies the maximum number of transactions to be displayed. The default is all outstanding transactions. |
|
Displays only transactions started by the process with the specified This option requires |
|
Displays lock information for the specified table. This option requires |
|
Prints the release number of |
|
Specifies the verbosity level. One of:
|
|
Displays information for the specified transaction, including its log hold LSN.In the output, the field " This option requires |
|
Enables you to commit a transaction. This may be particularly useful for long running transactions. The parameter This stops any currently running operations on behalf of that transaction and then rolls back the transaction in TimesTen. If there is currently a checkpoint in process when the rollback is requested, TimesTen terminates the checkpoint operation. This command does not stop cache operations on the Oracle database. Operations include passthrough statements, flushing, manual loading, manual refreshing, synchronous writethrough, propagating, and dynamic loading. This option requires |
|
Enables you to roll back a transaction. This may be particularly useful for long running transactions. The parameter If there is currently a checkpoint in process when the rollback is requested, TimesTen terminates the checkpoint operation. This command does not stop cache operations on the Oracle database. Operations include passthrough statements, flushing, manual loading, manual refreshing, synchronous writethrough, propagating, and dynamic loading. This option requires |
Output
ttXactAdmin
produces the following output:
Column | Description |
---|---|
|
The executable file name of the process that owns the transaction. |
|
The process ID of the application that owns the transaction. On Linux, the PID of the thread that opens the connection. |
|
The internal identifier that distinguishes between multiple connections to the database made by a single multithreaded process. |
|
The unique identifier for the transaction used internally by TimesTen. For TimesTen Classic, the identifier has two parts. For TimesTen Scaleout, the identifier is prefixed by the Element ID. The first part is a relatively small value (less than 2048), used to identify the connection of the program running the transaction. The second part is a potentially large value (an unsigned integer), that distinguishes between successive uses of the same first part. (The value wraps around if necessary.) Thus, identifiers 4.100 and 4.200 cannot be present at the same time. If 4.100 is seen, and then 4.200, this indicates that transaction 4.100 has completed (committed or rolled back). |
|
Current state of the transaction, one of:
When using TimesTen Scaleout, the current status of the transaction, one of:
|
|
The type of the lock being requested:
|
|
A unique identifier of each unique resource. The identifier is displayed in hexadecimal format with a few exception. |
|
A value used to determine the level of concurrency that the lock provides:
|
|
The mode in which the competing transaction is holding the lock which the waiting transaction is requesting. See "Mode" in this table for concurrency level descriptions. |
|
Shows the mode in which the waiting transaction has requested to hold the lock. See "Mode" in this table for concurrency level descriptions. |
|
The identifier of the transaction with which the waiting transaction is in contention. |
|
The name of the table that the lock is being held on or within. |
Examples
The following command displays all locks in the database:
% ttXactAdmin -connStr "DSN=demodata"
2022-03-20 13:02:54.760
/timesten/jsmith/demo/demodata
TimesTen Release 22.1.1.21.0
ElementID 1
Program File Name: _ttIsql
XactID PID Context State Loghold Last ID
1.1.195 115640 0x859570 Active 391.15355904 [1666839:6]
Resource ResourceID Mode SqlCmdID Name
Database 0x01312d0001312d00 IX 0
Table 2367528 IXn 275642480 JSMITH.T
Row AAAVVUAAADXAQAANje Xn 275642480 JSMITH.T
Begin Time: 13:01:43.108
1 outstanding transaction found
Notes
If the transaction specified in the command is not an XA transaction branch but a TimesTen local transaction, no XA-XID
are displayed. The XA-XID
is a C structure that contains a format identifier, two length fields and a data field. The data field consists of at most two contiguous components: a global transaction identifier (gtrid
) and a branch qualifier (bqual
). The two length fields specify the number of bytes (1-64) in gtrid
and bqual
respectively. For more details, refer to the X/Open publication: Distributed Transaction Processing: The XA Specification (c193).
For databases, TimesTen only holds S
locks when the isolation mode is serializable. For commands, S
only means "shared" lock, and can be held in either serializable or read-committed isolation modes. Under RMode
, awaiting transactions are sorted by PID and Context. The listing does not reflect the order of the lock requests.
A lock request with an RMode
compatible with the HMode
of the lock holder can be waiting because there is another lock request with an incompatible mode ahead of the compatible request in the lock request queue.
A transaction can have the status Aborting
for one of these reasons:
-
A user application requested a rollback after doing a large amount of work.
-
An application with
autocommit
tried a statement that could not be completed and it is being undone. -
Another call to
ttXactAdmin
caused a transaction to rollback. -
A process died with work in progress and that work is being undone.