Chinaunix首页 | 论坛 | 博客
  • 博客访问: 473660
  • 博文数量: 711
  • 博客积分: 3000
  • 博客等级: 中校
  • 技术积分: 4200
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-28 14:18
文章分类

全部博文(711)

文章存档

2011年(1)

2008年(710)

我的朋友

分类:

2008-10-29 11:55:15


  现象:
  在oracle的工作队列里面执行过程,执行出错,导致队列死掉了。我使用remove把作业从工作队列里面去除掉,重新修改过程,可是编译的时候死掉了,根据以往的经验,是因为过程正在执行的时候不能编译的原因,重新启动数据库之后过程编译就正常了。
  
  问题:请问如何让队列里正在执行的任务彻底停止?,否则要重新启动数据库太麻烦了
  
  FW:你可以尝试
  1: select sid from v$lock where TYPE = 'JQ';
  2: select sid,serial# from v$session where sid = :sid;
  3: select ADDR ,PID ,SPID ,SERIAL# from v$process where pid = :sid;
  
  oracle: kill the session
  os : kill the process
  
  hope this can help you
  
  估计前提是 执行 job 的进程有多个
  job_queue_processes integer 4
  
  FW:另外一种办法
  select v.sid,v.serial#,v.PROCESS from V$session v,DBA_JOBS_RUNNING R,DBA_JOBS J
  where J.WHAT like '%你JOB所调用的procdure%' and
  r.job=j.job and
  r.sid=v.sid
  
  oracle: kill the session
  os : kill the process
  麻烦的是就算kill session 后其占用的资源也不是马上释放掉
  FW:
【责编:admin】

--------------------next---------------------

阅读(352) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~