暂无图片
在Oracle杀了一个进程,但是进程一直是killed状态,spid查不到了
我来答
分享
tinge
2021-08-25
在Oracle杀了一个进程,但是进程一直是killed状态,spid查不到了

请教个问题,在数据库层杀了一个进程,但是好几天了进程一直是killed状态,spid查不到了怎么杀掉呢

我来答
添加附件
收藏
分享
问题补充
1条回答
默认
最新
Lucifer三思而后行
暂无图片

通过 sid 查不到 spid 吗?

set linesize 260
set pagesize 1000
col sid for 99999
col spid for a8
col event for a30
col module for a35
col machine for a15
col username for a10
col holder for a10
col final for a10
col sql_id for a15
col exec_gets for 99999999
col seconds for a5
col object_id for 999999
col param for a30
col sql_text for a6
col PGA_USE for 9999
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select a.sid,
       a.username,
       a.machine,
       a.module,
       a.event,
       a.sql_id,
       round(decode(c.executions,0,buffer_gets,buffer_gets/executions)) exec_gets,
       a.ROW_WAIT_OBJ# object_id,
       a.BLOCKING_INSTANCE||'_'||a.blocking_session  holder,
       a.FINAL_BLOCKING_INSTANCE||'_'||a.FINAL_BLOCKING_SESSION final,
       to_char(LAST_CALL_ET) seconds,
       a.p1 || '_' || a.p2 || '_' || a.p3 param,
       b.spid,
       trunc(b.PGA_USED_MEM / 1024 / 1024,2) as PGA_USE,
       substr(c.sql_text,0,6) sql_text
  from v$session a, v$process b,v$sql c
 where a.paddr = b.addr(+)
   and a.status = 'ACTIVE'
   and not (a.type = 'BACKGROUND' and a.state = 'WAITING' and
        a.wait_class = 'Idle')
   and a.sql_id=c.sql_id(+)
   and a.sql_child_number=c.CHILD_NUMBER(+)
   and a.sid='&SID'
 order by a.sql_id, a.machine
/
复制

试试用这个sql查一下看看?希望能帮助到你

暂无图片 评论
暂无图片 有用 0
打赏 0
暂无图片
回答交流
Markdown


请输入正文
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~