We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

How do I stop a Oracle schedule job already running

toooki
toooki asked
on
Medium Priority
1,627 Views
Last Modified: 2012-05-11
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.. job screen
Comment
Watch Question

Top Expert 2011

Commented:
hi tooki,
- does this question related to your early question on https://www.experts-exchange.com/Database/Oracle/Q_26926306.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.

Author

Commented:
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..
Top Expert 2011

Commented:
- you need to ask your DBA to grant the SCHEDULER_ADMIN role to you:

GRANT SCHEDULER_ADMIN TO username;
Top Expert 2011
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
OK. thank you. I am going through the link that you sent to me.
Top Expert 2011

Commented:
"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.

Author

Commented:
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.
Top Expert 2011

Commented:
- 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.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.