在sql窗口中
1.查询当前所有死锁进程的编号
select xidusn, object_id, session_id, locked_mode from v$locked_object;
(2).所有进程编号
select username,sid,serial# from v$session;
(3)杀掉相关的死锁进程
alter system kill session 'sid,serial#';
(4)查询死锁oracle进程对应的系统进程
select pro.spid from v$session ses,v$process pro where ses.sid=129 and ses.paddr=pro.addr;
(5)杀掉系统进程
kill -9 pid
总结:
select pro.spid,loc.xidusn,loc.object_id,loc.session_id,loc.locked_mode from v$locked_object loc,v$session ses,v$process pro where ses.sid=loc.session_id and ses.paddr=pro.addr;
kill -9 pid