论坛首页 综合技术论坛

ORACLE 锁监控SQL

浏览 1839 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2015-04-09  


SELECT a.sid||decode(request,0,'(holder)','(waiter)'||':blocked by:'||blocking_session) sess_id ,
lmode,
request,
a.type,
c.object_name,
decode(row_wait_obj#,-1,'Holder of Lock !!!',
dbms_rowid.rowid_create(1,row_wait_obj#,row_wait_file#,row_wait_block#,row_wait_row#)) row_id,
nvl(SQL_FULLTEXT,'Holder of Lock !!!')
FROM V$LOCK A, V$LOCKED_OBJECT B, ALL_OBJECTS C, V$SESSION D, V$SQL E
WHERE (id1, id2, a.type) in (select id1, id2, type from v$lock where request>0)
AND a.sid = b.session_id
AND b.object_id = c.object_id
AND d.sid = a.sid
AND d.sql_hash_value = e.hash_value(+)



论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics