Solved

Scheduling an Oracle Stored Procedure

Posted on 2011-03-07
4
550 Views
Last Modified: 2012-05-11
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
Comment
Question by:codemonkey2480
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 2

Assisted Solution

by:niaz
niaz earned 100 total points
ID: 35066094
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
 
LVL 5

Expert Comment

by:jaiminpsoni
ID: 35066123
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
 

Author Comment

by:codemonkey2480
ID: 35083483
Thanks for the links.
Do I need to ENABLE it then add it to the Scheduler Queue for it to work?
0
 
LVL 5

Accepted Solution

by:
jaiminpsoni earned 400 total points
ID: 35083792
Enable the schedule?

When you send argument like....

enabled => TRUE

It gets added as enabled...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question