oracle 无法停止/删除 DBMS_SCHEDULER 中的作业
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19809955/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot stop/drop job in DBMS_SCHEDULER
提问by Nianios
I managed to run a job from DBMS_SCHEDULER. But is running since yesterday and I cannot stop it. The code for the job is:
我设法从 DBMS_SCHEDULER 运行了一个作业。但是从昨天开始一直在运行,我无法阻止它。作业的代码是:
begin
sys.dbms_scheduler.create_job(job_name => 'FTREC.EXE_1',
job_type => 'EXECUTABLE',
job_action => 'C:\Users\WWLSERVER\Desktop\test.bat',
start_date => to_date(null),
repeat_interval => '',
end_date => to_date(null),
job_class => 'MY_JOB_CLASS',
enabled => false,
auto_drop => false,
comments => '');
end;
I tried to stop the job/drop it but with no luck.
When I run:
我试图停止工作/放弃它,但没有运气。
当我运行时:
begin
dbms_scheduler.stop_job('FTREC.EXE_1',true);
end;
I get no error, but
我没有错误,但是
SELECT * FROM USER_SCHEDULER_RUNNING_JOBS;
returns EXE_1 and if I try to drop the job
返回 EXE_1,如果我尝试放弃工作
begin
dbms_scheduler.drop_job('FTREC.EXE_1',true);
end;
I get this error:
我收到此错误:
ORA-27478: job "FTREC.EXE_1" is running
ORA-06512: at "SYS.DBMS_ISCHED", line 213
ORA-06512: at "SYS.DBMS_SCHEDULER", line 657
ORA-06512: at line 2
I have restarted the server but I had no luck. Any ideas how I can stop/drop this job?
我已经重新启动了服务器,但我没有运气。有什么想法可以停止/放弃这份工作吗?
采纳答案by Nianios
I want to put the answer in case someone new in Oracle guy face the same problem.
I had installed a Oracle Remote Agent to run the executable.
So I had first to stop the service (Oracle Remote Agent) and then stop the job.
我想给出答案,以防 Oracle 新手遇到同样的问题。
我已经安装了一个 Oracle Remote Agent 来运行可执行文件。
所以我必须首先停止服务(Oracle 远程代理),然后停止作业。
Thank you for your time and your help.
感谢您的时间和帮助。