查看系统中哪个表被锁定了

 

select 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 desc

 好长的,不好记。所以写下留个备注哈。

 

有两个的,一个是表锁TM,一个是行锁TX
你从v$lock中也能看出来 

by:piner

你可能感兴趣的:(系统)