• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

Scheduling an Oracle Stored Procedure

I have a SP called spTest under Employee Schema. How do I schedule this SP to run 6 Am every day? I would like to use the DBMS_SCHEDULER than the old DBMS_JOB. How would I do that? Please help.
0
codemonkey2480
Asked:
codemonkey2480
  • 2
2 Solutions
 
niazCommented:
This link explain oracle  DBMS_JOB and discuss Job scheduling in different scenario.

http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:388480262167
0
 
jaiminpsoniCommented:
You need something like this.....

begin
  dbms_scheduler.create_job(
      job_name => 'TEST_SCHEDULE'
     ,job_type => 'PLSQL_BLOCK'
     ,job_action => 'begin employees.spTest end; '
     ,start_date => '08-Mar-2011 06:00 AM'
     ,repeat_interval => 'FREQ=DAILY'
     ,enabled => TRUE
     ,comments => 'Testing the schedulee.');
end;
/

Also, this link will help you....

http://www.oradev.com/dbms_scheduler.jsp

I hope this helps you to start with...
0
 
codemonkey2480Author Commented:
Thanks for the links.
Do I need to ENABLE it then add it to the Scheduler Queue for it to work?
0
 
jaiminpsoniCommented:
Enable the schedule?

When you send argument like....

enabled => TRUE

It gets added as enabled...
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now