1.通过以下查找出已被锁定的数据库表及相关的sid、serial#及spid
select object_name as 对象名称,s.sid,s.serial#,p.spid as 系统进程号
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;
2.在数据库中灭掉相关session
select object_name as 对象名称,s.sid,s.serial#,p.spid as 系统进程号
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;
2.在数据库中灭掉相关session
alter system kill session 'sid,serial';sid及serial为第一步查出来的数据
本文转自zylhsy 51CTO博客,原文链接:http://blog.51cto.com/yunlongzheng/529653,如需转载请自行联系原作者