Dead Job Still In DBA_SCHEDULER_RUNNING_JOBS (文档 ID 2019899.1)

来源:互联网 发布:淘宝旺铺智能版好用吗 编辑:程序博客网 时间:2024/06/06 10:47
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.

阅读全文
0 0
原创粉丝点击