Solved

Scheduling an Oracle Stored Procedure

Posted on 2011-03-07
4
544 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now