views:

578

answers:

2

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:

*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:

*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?!?!

A: 

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

ajdams
Unfortunately, I think you may have the winning solution. This is very annoying. Thanks anyway.
Raggedtoad
A: 

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.

Tunde