Oracle® TimesTen In-Memory Database Reference Release 11.2.1 Part Number E13069-03 |
|
|
View PDF |
Description
The ttXactAdmin utility lists ownership, status, log and lock information for each outstanding transaction. The ttXactAdmin utility also allows you to heuristically commit, abort or forget an XA transaction branch.
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 what privilege is needed, if any.
Syntax
ttXactAdmin {-h | -help | -?} ttXactAdmin {-V | -version} ttXactAdmin [-v verbosity] [-lsn] [-mt maxTrans] [-ml maxLocks] [-pid pid] [-xact xid] [-tbl [owner.]tableName][-row rowid] [-interval seconds] [-count iterations] {DSN | -connstr connectionString} ttXactAdmin -latch [-interval seconds] [-count iterations] {DSN | -connstr connStr} ttXactAdmin -latchstats clear | off |on | [show] [-interval seconds] [-count iterations] {DSN | -connstr connectionString} ttXactAdmin -connections [-pid pid] [-interval seconds] [-count iterations] {DSN | -connstr connStr} ttXactAdmin -xactIdRollback xid {DSN | -connstr connStr} ttXactAdmin {-HCommit xid | -HAbort xid | -HForget xid} {DSN | -connstr connStr}
Options
ttXactAdmin has the options:
Option | Description |
---|---|
-connections |
Shows all current connections to the data store. When run with the -connections option, ttXactAdmin itself does not establish a true connection to the data store, and requires no latches. This can be useful when diagnosing frozen systems.
This option requires ADMIN privileges. |
-connStr connectionString |
An ODBC connection string containing the name of the data store, the server name and DSN (if necessary) and any relevant connection attributes. |
-count iterations |
Generate the report iterations times. If no-interval option is specified, an interval of 1 second is used. |
DSN |
Indicates the ODBC data source name of the data store to be administered. |
-h
|
Prints a usage message and exits. |
-HAbort xid |
Heuristically abort an XA transaction branch in TimesTen. The specified transaction ID must be the local TimesTen TransID.
This option requires ADMIN privileges or ownership of the specified transactions. |
-HCommit xid |
Heuristically commit an XA transaction branch in TimesTen. The specified transaction ID must be the local TimesTen TransID.
This option requires ADMIN privileges or ownership of the specified transactions. |
-HForge t xid |
Heuristically forget an XA transaction branch in TimesTen. The specified transaction ID must be the local TimesTen TransID.
This option requires ADMIN privileges or ownership of the specified transactions. |
-interval seconds |
Repeat the generation of the report, pausing the indicated number of seconds between each generation. If no -count option is specified, repeat forever. |
-latch |
This option is to be used by TimesTen Customer Support only. Shows only the latch information for the data store specified. |
-latchstats[clear | off | on | show] |
This option is to be used by TimesTen Customer Support only. Performs the requested latchstat operation.
This option requires ADMIN privileges. All other options are ignored when
|
-ml maxLocks |
Maximum number of locks per transaction. Default is 6000. |
-mt maxTrans |
Specifies the maximum number of transactions to be displayed. The default is all outstanding transactions. |
-pid pid |
Displays only transactions started by the process with the specified pid. On Linux, it is the pid of the thread that opens the connection.
This option requires ADMIN privileges or ownership of the specified transactions. |
-row rowid |
Displays lock information for the specified row.
This option requires ADMIN privileges or data store object ownership. |
-tbl [owner .]tableName |
Displays lock information for the specified table.
This option requires ADMIN privileges or ownership of the specified table. |
-V | -version |
Prints the release number of ttXactAdmin and exits. |
-v verbosity |
Specifies the verbosity level. One of:0-does not display the names of the tables for row locks. In this case, ttXactAdmin runs faster.1-(the default) displays the names of the tables for row locks. |
-xact xid |
Displays the logical ID and physical ID of log records for the specified transaction. The log record identifiers of the specified transaction are automatically included in the output.
This option requires ADMIN privileges or ownership of the specified transactions. |
-xactIdRollback xid |
Allows you to roll back a transaction. This may be particularly useful for long running transactions. This parameter xid represents the transaction ID.This stops any currently executing 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 IMDB Cache operations on Oracle. Operations include passthrough statements, flushing, manual loading, manual refreshing, synchronous writethrough, propagating, and transparent loading. This option requires ADMIN privileges or ownership of the specified transactions. |
Output
ttXactAdmin produces the following output:
Column | Description |
---|---|
Program File Name |
The executable file name of the process that owns the transaction |
PID |
The process ID of the application that owns the transaction. On Linux, the PID of the thread that opens the connection. |
Context |
The internal identifier that distinguishes between multiple connections to the data store made by a single multithreaded process. |
TransId |
The unique identifier for the transaction used internally by TimesTen. The identifier has two parts.
The first part is a relatively small value (less than 2048), used to discriminate between transactions that are active at the same time. The second part is a potentially large value (an unsigned integer), and is used to discriminate 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). |
TransStatus |
Current status of the transaction, one of:
|
Resource |
The type of the lock being requested:
|
ResourceId |
A unique identifier of each unique resource. The identifier is displayed in hexadecimal format with a few exception. Table and CompCmd are shown as decimal values. Row locks are shown in the ROWID character format. |
Mode |
A value used to determine the level of concurrency that the lock provides:
S - Shared lock in serializable isolation. Sn - Shared lock in non-serializable isolation .U - Update lock in serializable isolation. Un - Update lock in non-serializable isolation. En - End-of-scan lock for non-serializable isolation. IRC - Intention shared lock in non-serializable isolation. IS - Intention shared lock in serializable isolation IU - Intention update lock in serializable isolation IUn - Intention update lock in non-serializable isolationIX - Intention exclusive lock in serializable isolation IXn - Intention exclusive lock non-serializable isolation SIX - Shared lock with intent to set an exclusive lock in serializable isolation. SIXn - Shared lock with intent to set an exclusive lock non-serializable isolation. X - Exclusive lock. Xn - Exclusive lock in non-serializable isolation. W - Update, insert or delete table lock. XNi - Next lock for inserting into tables or non-unique index NS - Table lock in read-committed isolation that conflicts with all table locks in serializable isolationLock "0" means the blocker is still in the waiting list. |
HMode |
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. |
RMode |
Shows the mode in which the waiting transaction has requested to hold the lock. See "Mode" in this table for concurrency level descriptions. |
HolderTransId |
The identifier of the transaction with which the waiting transaction is in contention. |
Name |
The name of the table that the lock is being held on or within. |
Example
The following command displays all locks in the data store:
ttXactAdmin -connstr DSN=demodata
Outstanding locks
PID Context TransId TransStatus Resource ResourceId Mode Name Program File Name: localtest 10546 0x118e28 2047.000003 Active Table 411104 IS SYS.TABLES Table 416480 IXn TEST1.TAB1 Row BMUFVUAAABQAAAAGTD Sn SYS.TABLES Hashed Key 0x69cf9c36 Sn SYS.TABLES Database 0x01312d00 IX Row BMUFVUAAABQAAAAGzD Xn TEST1.TAB1 Program File Name: /users/smith/demo/XAtest1 XA-XID: 0xbea1-001b238716dc35a7425-64280531947e1657380c5b8d 1817 0x118e28 2046.000004 Active Table 416480 IS TEST1.TAB1 CompCmd 21662408 S Database 20000000 IS Row BMUFVUAAABQAAAAJzD Sn TEST1.TAB1 Program File Name: /users/smith/demo/XAtest2 XA-XID: 0xbea1-001c99476cf9b21e85e1-70657473746f7265506f6f6c 27317 0x118e28 2045.000005 Prepared Table 411104 IS SYS.TABLES Table 416816 IXn TEST1.TAB2 Row BMUFVUAAABQAAAAMzD Sn SYS.TABLES Database 0x01312d00 IX Hashed Key 0x67fe3852 Sn SYS.TABLES Row BMUFVUAAABQAAAAHTE Xn TEST1.TAB2 Program File Name: /users/smith/demo/Reptest 27589 0x118e28 2044.000006 Rep-Wait-Return Awaiting locks PID Context TransId Resource ResourceId RMode HolderTransId HMode Name Program File Name: /users/smith/demo/XAtest1 1817 0x118e28 2046.000004 Row BMUFVUAAABQAAAAPTD Sn 2047.000003 Xn TEST1.TAB1
The following command displays all locks for transaction 2045.000005:
ttXactAdmin -xact 2045.000005 -connstr DSN=demodata PID Context TransStatus 1stLSN LastLSN Resource ResourceId Mode Name Program File Name: /users/smith/demo/XAtest2 XA-XID: 0xbea1-001c99476cf9b21e85e1-70657473746f7265506f6f6c 27317 0x118e28 Prepared 0.0116404 0.0116452 Table 411104 IS SYS.TABLES Table 416816 IXn TEST1.TAB2 Row BMUFVUAAABQAAAAGzE Sn SYS.TABLES Database 0x01312d00 IXn Hashed Key 0x67fe3852 Sn SYS.TABLES Row BMUFVUAAABQAAAAKzE Xn TEST1.TAB2
To display all the connections to the data store:
$ ttXactAdmin -connections sample 2006-09-10 10:26:33 /datastore/terry/sample TimesTen Release 11.2.1.0.0 ID PID Context Name Program State TransID UID 1 29508 0x00000001001c6680 myconnection ttIsql Run 1.23 TERRY 2044 29505 0x0000000100165290 Worker timestensubd Run TERRY 2045 29505 0x00000001001df190 Flusher timestensubd Run TERRY 2046 29505 0x000000010021cc50 Monitor timestensubd Run TERRY 2047 29505 0x0000000100206730 Checkpoint timestensubd Run TERRY 5 connections 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).
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.