Help - Search - Members - Calendar
Full Version: Submit Job (10g)
Oracle DBA Forums > Oracle > Oracle Forum
Manny
I need to submit a job to run a procedure every day at 2 am, will this work when I submit it as follows...

DBMS_JOB.SUBMIT (:v_jobnum, 'lead.soil_processing_pk;', trunc(sysdate)+ 24/24,'trunc(sysdate+1)+ 2/24');

Thanks for the feedback.
SteveC
And when you tested this on your own, you observed the following:.....
Manny
QUOTE (SteveC @ Jul 9 2008, 01:35 PM) *
And when you tested this on your own, you observed the following:.....


I have not tested it, just wondering if the syntax is correct.
SteveC
And when you tried to create the job, you observed the following:....
Manny
QUOTE (Manny @ Jul 9 2008, 01:39 PM) *
I have not tested it, just wondering if the syntax is correct.


I do get an error

13:48:41 @sde>VARIABLE v_jobnum NUMBER;
13:50:01 @sde>BEGIN
13:50:01 2 DBMS_JOB.SUBMIT (:v_jobnum, 'omahalead.soil_processing_pk;', trun
c(sysdate)+ 24/24,'trunc(sysdate+1)+ 2/24');
13:50:01 3 END;
13:50:08 4 /
BEGIN
*
ERROR at line 1:
ORA-06550: line 1, column 93:
Please-00221: 'SOIL_PROCESSING_PK' is not a procedure or is undefined
ORA-06550: line 1, column 93:
PL/SQL: Statement ignored
ORA-06512: at "SYS.DBMS_JOB", line 79
ORA-06512: at "SYS.DBMS_JOB", line 136
ORA-06512: at line 2

What am I doing wrong...
SteveC
'SOIL_PROCESSING_PK' is not a procedure or is undefined
Manny
QUOTE (Manny @ Jul 9 2008, 02:00 PM) *
I do get an error

13:48:41 @sde>VARIABLE v_jobnum NUMBER;
13:50:01 @sde>BEGIN
13:50:01 2 DBMS_JOB.SUBMIT (:v_jobnum, 'omahalead.soil_processing_pk;', trun
c(sysdate)+ 24/24,'trunc(sysdate+1)+ 2/24');
13:50:01 3 END;
13:50:08 4 /
BEGIN
*
ERROR at line 1:
ORA-06550: line 1, column 93:
Please-00221: 'SOIL_PROCESSING_PK' is not a procedure or is undefined
ORA-06550: line 1, column 93:
PL/SQL: Statement ignored
ORA-06512: at "SYS.DBMS_JOB", line 79
ORA-06512: at "SYS.DBMS_JOB", line 136
ORA-06512: at line 2

What am I doing wrong...



Got it to work had to include .begin_job.

Thanks
aussie_dba
Hi Manny,

Dr. Hall has some good working examples of job scheduling timings here:

http://www.dba-oracle.com/tips_oracle_dbms_job.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.