Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Examples of dbms_job.submit intervals and arguments

RE: Examples of dbms_job.submit intervals and arguments

From: Bob Metelsky <bmetelsky_at_cps92.com>
Date: Thu, 30 Jan 2003 06:09:19 -0800
Message-ID: <F001.0053E7D2.20030130060919@fatcity.com>

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.
>
> - Kirti
>
>
> -----Original Message-----
> From: Bob Metelsky [mailto:bmetelsky_at_cps92.com]
> Sent: Wed 1/29/2003 4:44 PM
> To: Multiple recipients of list ORACLE-L
> Cc:
> Subject: Examples of dbms_job.submit intervals and arguments
>
> All
>
> I need to get a better understanding of the arguments
> to dbms_job.submit particulay the interval although all
> parameters would not hurt.
>
>
> Ive searched online and at tahiti but I couldn't really find
> "good" examples of usage
>
> Can someone point me in the right direction? Or provide examples..?
>

-- 
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).
Received on Thu Jan 30 2003 - 08:09:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US