Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Examples of dbms_job.submit intervals and arguments
Bob,
I think the job is just missing the begin and end to make it a pl/sql
block.
dbms_job.submit
(:jobno, 'begin UPDATE TIME SET STATUS = ''O'' WHERE STATUS = ''I'' ;
end;',
trunc(sysdate+1),
'trunc(SYSDATE+1)',
TRUE, :instno);
(If there are no rows in TIME, the job will fail with an unhandled exception.)
Chaim
The 4 seasons here in Montreal: early winter,winter,late winter and next
winter
on a warm -18 C (0 F) day
"Bob Metelsky" <bmetelsky_at_cps92.com>@fatcity.com on 01/30/2003 09:09:18 AM
Please respond to ORACLE-L_at_fatcity.com
Sent by: root_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc:
Yes, thanks that's helpful but....
Here is a job, Im trying to simply call some sql but apparently I cant pass sql as an argument. Or my string variables in the sql are double single quotes?? Im not sure if they should be double single quotes or just double quotes
Should this work?? It submits fine but if I execute it I get the following
LOCDB SQL> execute dbms_job.run(71);
BEGIN dbms_job.run(71); END;
*
ERROR at line 1:
ORA-12011: execution of 1 jobs failed ORA-06512: at "SYS.DBMS_IJOB", line 394 ORA-06512: at "SYS.DBMS_JOB", line 267 ORA-06512: at line 1 #########################################
variable jobno number;
variable instno number;
begin
select instance_number into :instno from v$instance;
dbms_job.submit
(:jobno, 'UPDATE TIME SET STATUS = ''O'' WHERE STATUS = ''I'' ;',
trunc(sysdate+1),
'trunc(SYSDATE+1)',
TRUE, :instno);
commit;
end;
Also, Im not sure how to create a simple stored procedure wich simply contains the above sql.
Any help would be graciously accepted...
Thanks
Bob
> Bob,
> Try Tom Kyte's web site: http://asktop.oracle.com.
> Search for dbms_job.
> There are some good examples.
>
> >> To: Multiple recipients of list ORACLE-L
> -----Original Message-----
> From: Bob Metelsky [mailto:bmetelsky_at_cps92.com]
> Sent: Wed 1/29/2003 4:44 PM
>
>> to dbms_job.submit particulay the interval although all
> I need to get a better understanding of the arguments
> >
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Bob Metelsky INET: bmetelsky_at_cps92.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: Chaim.Katz_at_Completions.Bombardier.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Jan 30 2003 - 09:34:49 CST
![]() |
![]() |