Solved

Scheduling an Oracle Stored Procedure

Posted on 2011-03-07
4
548 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fastest way to replace data in Oracle 5 65
execute immediate plsql block 5 47
Oracle Listener Not Starting 11 44
Oracle - SQL Query with Function 3 36
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

803 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