Oracle 视图 V$TRANSACTION_ENQUEUE 官方解释,作用,如何使用详细说明

本站中文解释

V$TRANSACTION_ENQUEUE视图查询当前数据库系统中有关事务锁定请求情况的信息。它显示当前每个会话正在等待获得某种类型锁定的信息,或者正在持有它们的信息。

使用方法:

SQL> SELECT SID,name,enqueue_mode,state
FROM V$transaction_enqueue
WHERE status = ‘ACTIVE’;

此查询将返回正在请求某种类型锁定的每个会话的SID、会话名称、所请求的锁定类型和锁定的状态。

官方英文解释

V$TRANSACTION_ENQUEUE displays locks owned by transaction state objects.

Column Datatype Description

ADDR

RAW(4 | 8)

Address of lock state object

KADDR

RAW(4 | 8)

Address of lock

SID

NUMBER

Identifier for session holding or acquiring the lock

TYPE

VARCHAR2(2)

Type of lock. TX indicates transaction enqueue.

ID1

NUMBER

Lock identifier #1 (depends on type)

ID2

NUMBER

Lock identifier #2 (depends on type)

LMODE

NUMBER

Lock mode in which the session holds the lock:

  • 0 – none

  • 1 – null (NULL)

  • 2 – row-S (SS)

  • 3 – row-X (SX)

  • 4 – share (S)

  • 5 – S/Row-X (SSX)

  • 6 – exclusive (X)

REQUEST

NUMBER

Lock mode in which the process requests the lock:

  • 0 – none

  • 1 – null (NULL)

  • 2 – row-S (SS)

  • 3 – row-X (SX)

  • 4 – share (S)

  • 5 – S/Row-X (SSX)

  • 6 – exclusive (X)

CTIME

NUMBER

Time since current mode was granted

BLOCK

NUMBER

The lock is blocking another lock

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data


数据运维技术 » Oracle 视图 V$TRANSACTION_ENQUEUE 官方解释,作用,如何使用详细说明