1
2
3
4
5
6
7
8
|
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#,p.spid
from v$locked_object l,dba_objects o,v$session s,v$process p
where l.object_id=o.object_id
and l.session_id=s.sid
and s.paddr = p.addr
order by o.object_id,xidusn DESC ;
|
好了,找到你需要操作的表名,然后找到对应的SID和SERIAL#
替换下面语句的变量,然后执行,即可解锁。
1 |
alter system kill session 'sid,serial#' ;
|
那么你应该执行的杀死死锁的语句如下:
1 |
alter system kill session '35,1980' ;
|
肯定会成功的!