Help - Search - Members - Calendar
Full Version: DBMS_JOB
Oracle DBA Forums > Oracle > Oracle Forum
youngb912
I need to schedule a stored procedure to run using DBMS.JOB. Please show me how I can get this done. Here is it -

The stored procedure to run is:

GLOVIA_PROD.DIVTREND_PROC('EPM',
TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MM'),
TO_CHAR(ADD_MONTHS(SYSDATE,-1),'YYYY'));


This should run on the 1st of every month starting July 1, 2008.

It is already created in the database
andrew kerber
What is your Oracle version?

Here is an example of setting up a job using dbms_jobs:

http://www.dba-oracle.com/tips_oracle_dbms_job.htm


However, if you are Oracle 10g or higher, dbms_scheduler is what you should use:

http://www.dba-oracle.com/t_dbms_job_scheduler.htm

http://www.dba-oracle.com/t_dbms_scheduler_examples.htm
youngb912
QUOTE (andrew kerber @ Jun 30 2008, 09:44 PM) *
What is your Oracle version?

Here is an example of setting up a job using dbms_jobs:

http://www.dba-oracle.com/tips_oracle_dbms_job.htm
However, if you are Oracle 10g or higher, dbms_scheduler is what you should use:

http://www.dba-oracle.com/t_dbms_job_scheduler.htm

http://www.dba-oracle.com/t_dbms_scheduler_examples.htm



My database version is 8.1.7. I reviewed this links and still clueless somehow. What I need is to submit a dbms job as follow -

GLOVIA_PROD.DIVTREND_PROC('EPM',
TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MM'),
TO_CHAR(ADD_MONTHS(SYSDATE,-1),'YYYY'));

The above should run on the 1st of every month starting July 1, 2008.

I beleive it should start like -
DBMS_JOB.SUBMIT(****) etc
HAL9000
"What I need is to submit a dbms job as follow "

OK, so what's the problem? Do you have a question?

http://www.dba-oracle.com/t_dbms_scheduler_examples.htm

Did you not understand these examples?

If you want to understand Oracle Job Scheduling, get the Oracle Job Scheduling book:

http://www.rampant-books.com/book_2005_1_scheduling.htm
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.