日期:2014-05-16 浏览次数:20631 次
SELECT s.sid,s.serial# as serial,o.object_name, /*+ rule */ lpad(' ',decode(l.xidusn ,0,3,0))||l.oracle_username User_name, o.owner,o.object_type FROM v$locked_object l,dba_objects o,v$session s WHERE l.object_id=o.object_id AND l.session_id=s.sid ORDER BY o.object_id,xidusn DESC
?
object_name代表当前正在锁定的数据库对象,一般是表,找到目标表,用下面的语句杀掉锁定:
--133表示SID,3506表示serial alter system kill session '133,3506' ;?