Query Locked Objects from v$locked_object
SELECT SUBSTR(b.owner, 1, 8) owner, b.object_type, SUBSTR(b.object_name, 1, 18) object_name
, DECODE(a.locked_mode
, 0, 'None'
, 1, 'Null'
, 2, 'Row-S'
, 3, 'Row-X'
, 4, 'Share'
, 5, 'S/Row-X'
, 6, 'Exclusive') locked_mode
, a.session_id,a.oracle_username, a.os_user_name, TO_CHAR(c.logon_time,'YYYY/MM/DD HH24:MI:SS') logon_time, c.PROGRAM,c.saddr
FROM
v$locked_object a
, dba_objects b
, v$session c
WHERE
a.object_id = b.object_id AND a.session_id = c.sid
ORDER BY b.object_name, b.owner, b.object_type
全站熱搜
留言列表