#查询语句执行之后如果有结果那么就是数据库中产生死锁
select p.spid,c.object_name,b.session_id,b.oracle_username,b.os_user_name from v$process p,v$session a,v$locked_object b,all_objects c
where p.addr=a.paddr
and a.process=b.process
and c.object_id=b.object_id
#根据上面查询出来的结果中将session_id这个值填入下面sid中
SELECT sid, serial#, username, osuser FROM v$session where sid='1706';
#然后根据上面查询出来的sid信息中,依次输入 sid 和serial#中的值,然后执行下面语句
alter system kill session '1706,909';