查杀 oracle sql 卡死的进程

--查出SID名字
select * from v$access where object ='PKG_SMSSEND_PROC';
--通过sid查出spid
select  spid,osuser, s.program  from v$session s,v$process p where s.paddr=p.addr and s.sid=(select sid from v$access where object ='PKG_SMSSEND_PROC');
--杀进程
登录ssh, kill -9 spid

select spid,osuser
  from v$session s, v$process p
 where s.paddr = p.addr
   and s.sid in (select sid from v$access where object = 'PKG_SMSSEND_PROC');
PKG名字要大写
   
   
   
   --第二种
   [ 查看锁 ]
select a.object_name||'|'||b.session_id||'|'||c.serial#||'|'||c.program||'|'||c.username||'|'||c.command||'|'||c.machine||'|'||
c.lockwait from all_objects a,v$locked_object b,v$session c where a.object_id=b.object_id and c.sid=b.session_id;

[ 解锁 ]
alter system kill session 'session_id,serial'

posted on 2016-08-21 18:53  lovebeauty  阅读(1569)  评论(0编辑  收藏  举报

导航