Raggedtoad
Raggedtoad

Reputation: 521

How do I stop or drop a job from the Oracle Job Scheduler

Sounds easy, right? I have a job that is running that I'd like to stop (it's been running for way to long, and there is clearly a problem with it). Well, when I try to stop the job, I get this message:

ORA-27366: job "string.string" is not running. Cause: An attempt was made to stop a job that was not running.

However, when I try to drop the job entirely, because I REALLY don't want it running anymore, I get this message:

ORA-27478: job "string.string" is running. Cause: An attempt was made to drop a job that is currently running.

Really, Oracle? Make up your mind! Has anyone seen this before? How do I stop this rogue job without restarting the server?!?!

Upvotes: 5

Views: 38865

Answers (2)

Tunde
Tunde

Reputation: 139

You could try this:

DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'my_jobname');

OR

try desc the job name as well. Oracle creates a table for a job immediately its created. Try desc jobname; bear in mind the schema that created the job and append it to the jobname in the desc statement.

then you can drop it with the drop table statement.

Upvotes: 0

ajdams
ajdams

Reputation: 2314

This has happened to us before and we had to bounce the server, very annoying.

Upvotes: 4

Related Questions