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

Home -> Community -> Usenet -> c.d.o.misc -> DBMS_JOB.SUBMIT

DBMS_JOB.SUBMIT

From: <jwagans4053_at_my-deja.com>
Date: Mon, 23 Aug 1999 18:30:48 GMT
Message-ID: <7ps40p$f9o$1@nnrp1.deja.com>

> I would like to create a proc that allows you to submit a job on the
 fly, and run at 4am on that day. Then have the job resubmit itself on  saturday next at 4am. this is what I came up with but I get a -6550 err I believe it is related to v_nxtdate. I have not seen anything that says you cant use varibles.
 Help!!

CREATE OR REPLACE PROCEDURE dejasub
--
--
IS

   v_o_cd     cch_error_log.ora_cd%TYPE    := NULL;
   v_JobNum       BINARY_INTEGER;

   v_run_date      DATE := TRUNC(SYSDATE) + (4+40/60)/24;   --  04:00AM
   v_nxtdate       VARCHAR2(80) := 'next_day((SYSDATE +
7),''Saturday'')';
   DBMS_JOB.SUBMIT(v_JobNum,                 -- Return of job number
                'Satins;',               -- Procedure to submit
                 v_run_date,         -- Next date/time to run
                 v_nxtdate);          -- Interval of next day

   COMMIT;
EXCEPTION
   WHEN OTHERS
   THEN
   v_O_cd := sqlcode;

      DBMS_OUTPUT.PUT_LINE('Error running dejasub ' || v_o_cd); END dejasub;
/

SQL> exec dejasub
Error running dejasub -6550

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Aug 23 1999 - 13:30:48 CDT

Original text of this message

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