oracle 表被锁了解决方案

使用下面的语句来查询被锁定的表:

SELECT /*+ rule */ lpad(' ',decode(l.xidusn ,0,3,0))||l.oracle_username User_name,

 

  • o.owner,o.object_name,o.object_type,s.sid,s.serial#

 

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

使用下面的语句进行解锁:

alter system kill session 'sid,SERIAL#';

你可能感兴趣的:(oracle)