Oracle 视图 V$GLOBAL_BLOCKED_LOCKS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图V$GLOBAL_BLOCKED_LOCKS用于查看全局事务阻塞的锁。
此视图将显示给定会话所拥有的每个锁(如表或行)的此会话的全局事务之间的锁冲突,以及由于这些阻塞(死锁无法回滚)而可能阻止给定会话进行提交的会话。
此视图的用途是帮助检测和诊断死锁问题。它能够显示由会话锁定并阻止目前事务完成的会话以及它们相互之间的锁冲突关系。每条记录包含由锁冲突引起的阻塞的会话的SID,以及相关的锁类型,模式,表,行等信息。
使用示例:
SELECT BLOCKING_SESSION AS 死锁会话,
BLOCKING_INSTANCE AS 死锁实例,
HOLDING_SESSION AS 阻塞会话,
HOLDING_INSTANCE AS 阻塞实例
FROM V$GLOBAL_BLOCKED_LOCKS
ORDER BY BLOCKING_SESSION;
官方英文解释
V$GLOBAL_BLOCKED_LOCKS
displays global blocked locks.
Column | Datatype | Description |
---|---|---|
|
|
Address of lock state object |
|
|
Address of lock |
|
|
Identifier of session holding the lock (number) |
|
|
Resource type (char) |
|
|
Resource identifier #1 (number) |
|
|
Resource identifier #2 (number) |
|
|
Lock mode held (number) |
|
|
Lock mode requested (number) |
|
|
Time since current mode was granted |
|
|
The ID of the container to which the data pertains. Possible values include:
|