Link to home
Start Free TrialLog in
Avatar of toooki
toooki

asked on

How do I stop a Oracle schedule job already running

I do not have DBA privilege. But with my schema login I am running a job. From the IDE I see that the job has been running from hours.
If I right-click on the job name and delete (shows error that it is running) or Right-click on the running job and delete. It does not delete the job (no error is shown).
Is there any other way to delete the runnign job?

Also do you know what the "CPU Used" time mean there in the running job screen?
I assume out of the elapsed time, the job got CPU for only this much time.. User generated image
Avatar of OP_Zaharin
OP_Zaharin
Flag of Malaysia image

hi tooki,
- does this question related to your early question on https://www.experts-exchange.com/questions/26926306/Delete-Oracle-email-notification.html ?

- you need to have the SCHEDULER_ADMIN role to administer the scheduler. without the right privileged, you won't be able to drop  job.

Avatar of toooki
toooki

ASKER

Thanks.

No that question was different and that worked. That was related to stopping email notification job.

With the current schema user I scheduled the job so I should have the SCHEDULER_ADMIN role. I can delete a scheduled job too. But I cannot delete or stop an already running job (I am the owner of the job).

So was wondering if there is any known way to delete a running job..
- you need to ask your DBA to grant the SCHEDULER_ADMIN role to you:

GRANT SCHEDULER_ADMIN TO username;
ASKER CERTIFIED SOLUTION
Avatar of OP_Zaharin
OP_Zaharin
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of toooki

ASKER

OK. thank you. I am going through the link that you sent to me.
"No that question was different and that worked. That was related to stopping email notification job. "

- toooki,  if it works, then close that question and award the points to the solution that work to that issue.
Avatar of toooki

ASKER

Thank you for your help on the other question.

For this, well it worked with the command:
DBMS_SCHEDULER.DROP_JOB(job_name => 'MyPAckage.MyPROC', force => TRUE);

Strange that the IDE GUI did not let me delete the job but the above command did. So I am all ok with what I wanted .

Thanks.
- great it helps you toooki and thank you for the points :)

- the command line use force=true option which oracle will try to stop the job first and then proceed with the deletion. the GUI delete the job using the default option which is force=false which deletion is done after the is job execution finished.