--1.查询被锁的情况
select object_name,machine,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;
--2.用下面语句kill掉死锁的进程
alter system kill session ‘24,111‘; --(其中24,111分别是上面查询出的sid,serial#)
--3.如果上述kill不掉,则查询os级别线程
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=24
--4.在os级别删除线程