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

本站中文解释

Oracle视图V$LOCK_ACTIVITY用于查询锁上正在活动的会话。它表示现有锁活动示例的细节,包括会话id,上锁语句,资源类型,用于获得锁和阻止其他会话等。

使用方法:

SELECT owner,
ls.sid,
oracle_username,
oracle_Terminal,
lock_type,
lock_mode,
Lock_status,
sql_text
FROM v$lock_activity la,
v$session ls
WHERE la.session_id = ls.sid
ORDER BY lock_type;

该查询将返回活动锁的细节,其中包括拥有者,会话ID,Oracle用户名,Oracle终端,锁类型,锁模式,锁状态和相关的SQL语句。

官方英文解释

V$LOCK_ACTIVITY is deprecated. The information that was provided in this view is now provided in the V$INSTANCE_CACHE_TRANSFER and V$SEGMENT_STATISTICS views.

Column Datatype Description

FROM_VAL

CHAR(4)

Global Cache Resource initial state; always NULL

TO_VAL

CHAR(1)

Global Cache Resource initial state; always S

ACTION_VAL

CHAR(21)

Description of the conversion; always Lock buffers for read

COUNTER

NUMBER

Number of times the lock operation executed

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

See Also:

  • “V$INSTANCE_CACHE_TRANSFER”

  • “V$SEGMENT_STATISTICS”


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