oracle锁表,kill

阅读更多
select sess.SID,
       sess.SERIAL#,
       lo.ORACLE_USERNAME,
       lo.OS_USER_NAME,
       ao.OBJECT_NAME,
       lo.LOCKED_MODE
  from v$locked_object lo, dba_objects ao, v$session sess
where ao.OBJECT_ID = lo.OBJECT_ID
   and lo.SESSION_ID = sess.SID;

select * from v$session t1,v$locked_object t2 where t1.SID = t2.SESSION_ID;

                        -- sid,serial#
alter system kill session '400,19111';

你可能感兴趣的:(Oracle)