Oracle 杀死锁进程
Posted 沃德天
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle 杀死锁进程相关的知识,希望对你有一定的参考价值。
Oracle查询被锁的表:
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;
查看那个用户,那个进程造成的死锁
select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;
查看连接的进程:
SELECT sid, serial#, username, osuser FROM v$session;
在系统上杀死进程:
先查出进程的sid号,然后根据SID号查出SPID(系统进程)
select spid, osuser, s.program from v$session s,v$process p where s.paddr=p.addr and s.sid=24;
--杀掉进程 sid,serial#
alter system kill session‘210,11562‘;
涉及到的表:
SELECT * FROM v$lock;
SELECT * FROM v$sqlarea;
SELECT * FROM v$session;
SELECT * FROM v$process ;
SELECT * FROM v$locked_object;
SELECT * FROM all_objects;
SELECT * FROM v$session_wait;
以上是关于Oracle 杀死锁进程的主要内容,如果未能解决你的问题,请参考以下文章