日期:2014-05-16  浏览次数:20525 次

Oracle查出所有被锁住的表

--查出所有被锁住的表
select?b.owner?TABLEOWNER,?b.object_name?TABLENAME,?c.OSUSER?LOCKBY,?c.USERNAME?LOGINID,?c.sid?SID,?c.SERIAL#?SERIAL
from?v$locked_object?a,dba_objects?b,?v$session?c?
where?b.object_id?=?a.object_id?AND?a.SESSION_ID?=c.sid;
--通过SID,?SERIAL解锁?

--alter?system?kill?session?'SID,?SERIAL';