Dead Job Still In DBA_SCHEDULER_RUNNING_JOBS (文档 ID 2019899.1)

本文介绍了解决Oracle数据库中遇到的一个问题:当DBA_SCHEDULER_RUNNING_JOBS和V$SCHEDULER_RUNNING_JOBS中显示某任务正在运行但无法通过DBMS_SCHEDULER.STOP_JOB停止时的解决方案。提供了详细的步骤来禁用调度程序、停止并删除问题任务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.

GOAL

While querying DBA_SCHEDULER_RUNNING_JOBS and V$SCHEDULER_RUNNING_JOBS,  there is a job with no session ID and no process ID running with a large elapsed time. 
Actually this job is not really running. The problem is that , it can't be stopped using DBMS_SCHEDULER.STOP_JOB. It throws below error :

begin
dbms_scheduler.STOP_JOB(job_name=>'DGPYS.JB_UZLASTIRMA_CALISTIR', force=>true);
end;

ORA-27466: internal scheduler error: 1870 Check the log/trace file for more Details

 

SOLUTION

Below steps can be executed as a workaround to stop/drop the job. The steps need to be executed at a time when there are no other scheduler jobs are running/scheduled.

SQL> exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','TRUE');

exec dbms_scheduler.stop_job('DGPYS.JB_UZLASTIRMA_CALISTIR',TRUE);

exec dbms_scheduler.drop_job('DGPYS.JB_UZLASTIRMA_CALISTIR',TRUE);

exec dbms_scheduler.set_scheduler_attribute('SCHEDULER_DISABLED','FALSE');

 

The first statement will disable dbms_scheduler and will thus stop all executing jobs.After stopping and dropping the job dbms_scheduler needs to be restarted.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值