--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级别删除线程