查看當前DB的所有lock
SELECT /*+ rule */ s.username,
decode(l.type,'TM','TABLE LOCK','TX','ROW LOCK',NULL) LOCK_LEVEL,
o.owner,
o.object_name,
o.object_type,
s.sid,
s.serial#,
s.STATUS,
s.terminal,
s.machine,
s.program,
s.osuser,
s.LOGON_TIME
FROM v$session s,
v$lock l,
dba_objects o
WHERE l.sid = s.sid
AND l.id1 = o.object_id(+)
AND s.username is NOT NULL
and s.status ='ACTIVE';
可以用下面的alter語句來kill相關session
--alter system kill session '252,2404'
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51636/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29987/viewspace-51636/