TRANSACTIONALLOCKS System Table Description

Description

A pseudo table generated to show information about all transactional locks currently acquired in the database. If there are multiple Transaction Engines (TEs) running in the domain, this table shows a view of all transactional locks currently running from each TE. In other words, each transactional lock will be shown multiple times in this pseudo table, once for each TE running in the domain. For example, If there are four TEs, each lock will show in this table four times, each row representing a view of that transactional lock from each one of the four TEs. This is the intended behavior.

The SOURCENODE column in this table specifies the TE from where this lock held is being reported, but not necessarily the TE where the transaction is executing.

The NODEID column in this table specifies the TE on which the transaction owning the lock is currently running. This value for a given transaction does not change.

Client applications should never contain code that accesses SYSTEM pseudo tables as they are subject to, and furthermore likely to, change from release to release.

Fields

Field Type Description

OBJECTID

integer

A unique ID identifying the database object.

TRANSID

bigint

The identifier of the transaction owning the lock.

NODEID

bigint

The ID of the TE where this transaction is running.

Deprecated in NuoDB 7.0 and later. Use STARTID instead.

STARTID

bigint

The ID of the TE where this transaction is running. See Start ID.

LOCKTYPE

string

The type of lock to be set (EXCLUSIVE or SHARED).

SOURCENODE

integer

The node ID from which this particular row in the table has originated. If there are multiple TEs running in the domain, a row is generated in this table for each transaction for each TE. SOURCENODE identifies the TE reporting on this transaction. To identify the actual TE where this transaction is running, use NODEID.

Deprecated in NuoDB 7.0 and later. Use SOURCESTARTID instead.

SOURCESTARTID

integer

The start ID from which this particular row in the table has originated. If there are multiple TEs running in the domain, a row is generated in this table for each transaction for each TE. SOURCESTARTID identifies the TE reporting on this transaction. To identify the actual TE where this transaction is running, use STARTID. See Start ID.

Indexes

None

Example

SELECT * FROM system.transactionallocks;
==================================== Row #1 ====================================
OBJECTID: 72
TRANSID: 2050
NODEID: 2
STARTID: 2
LOCKTYPE: Shared
SOURCENODE: 2
SOURCESTARTID: 2
==================================== Row #2 ====================================
OBJECTID: 70
TRANSID: 898
NODEID: 2
STARTID: 2
LOCKTYPE: Exclusive
SOURCENODE: 2
SOURCESTARTID: 2
==================================== Row #3 ====================================
OBJECTID: 70
TRANSID: 898
NODEID: 2
STARTID: 2
LOCKTYPE: Exclusive
SOURCENODE: 3
SOURCESTARTID: 3