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:
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
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?
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.
Thank you for your time and your help.