Oracle 视图 V$LOCKED_OBJECT 官方解释,作用,如何使用详细说明
本站中文解释
视图
V$LOCKED_OBJECT是一个视图,可以查询活动会话正在锁定的对象信息,如表、行、触发器、存储过程等等。它显示当前正在被锁定的对象,以及请求锁定这些对象的会话和服务名称。使用这个视图,可以查找出那些可能正在影响当前会话的对象正被谁给加锁。
使用方法:
SELECT session_id, oracle_username, blocker.os_user_name,
lock_type, mode_held, mode_requested
FROM v$locked_object, v$session blocker
WHERE v$locked_object.session_id = blocker.sid;
上述语句可以用于查询当前所有的被锁定的对象的会话ID、Oracle登录名、操作系统登录名、锁定类型、获得锁定和请求锁定模式。
官方英文解释
V$LOCKED_OBJECT
lists all locks acquired by every transaction on the system. It shows which sessions are holding DML locks (that is, TM-type enqueues) on what objects and in what mode.
Column | Datatype | Description |
---|---|---|
|
|
Undo segment number |
|
|
Slot number |
|
|
Sequence number |
|
|
Object ID being locked |
|
|
Session ID |
|
|
Oracle user name |
|
|
Operating system user name |
|
|
Operating system process ID |
|
|
Lock mode. The numeric values for this column map to these text values for the lock modes for table locks:
See Also: Oracle Database |
|
|
The ID of the container to which the data pertains. Possible values include:
|