3

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?

12
  • which exact version are you using? 11g is a bit to vague. Upgrading to 11.2.0.4 if possible would be a good start. Commented Nov 6, 2013 at 11:47
  • I use 11.2.0.1. I will upgrade ASAP Commented Nov 6, 2013 at 12:02
  • @ik_zelf: I told the guy, responsible for Oracle to do it, but it will take some time(days actually because his hand are full). Do you have other idea how to stop/drop it? Commented Nov 6, 2013 at 12:26
  • whats the session's status ? is there a transaction ? is it possible that the job is the process of a rollback ? Commented Nov 6, 2013 at 13:26
  • Have you tried killing the session in the database or on the OS? Commented Nov 6, 2013 at 13:36

1 Answer 1

2

I had installed a Oracle Remote Agent to run the executable.
I first had to stop the service (Oracle Remote Agent) and then stop the job.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.