You have to run the job after you submit it. 
SQL> exec dbms_job.run(24);
Also make sure all init.ora parameters are set eg (job_queue_interval ,
job_queue_processes  )

HTH,
Rajesh


-----Original Message-----
Ling Catherine (CSC)
Sent: Tuesday, February 18, 2003 8:14 PM
To: Multiple recipients of list ORACLE-L


Hi Gurus,

I have submitted a job but it does not execute.  Why? Does the owner
require any privileges ? However, I can use DBMS_JOB.CHANGE command to
execute immediately.  I would like the job to execute on a daily basis.
Any advice ? TIA

--
-- Submit a job
--
  1  DECLARE
  2    job BINARY_INTEGER;
  3  BEGIN
  4    DBMS_JOB.SUBMIT(job,'PROCEDURE_NAME;',SYSDATE,'SYSDATE+1');
  5    DBMS_OUTPUT.PUT_LINE(TO_CHAR(JOB));
  6* END;
SQL> /
1

PL/SQL procedure successfully completed.

SQL> COMMIT;

Commit complete.

--
-- Execute the job
--
  1  begin
  2  DBMS_JOB.CHANGE(1,
  3  '
PROCEDURE_NAME;',to_date('1802200308:00:00','ddmmyyyyhh24:mi:ss'),'SYSDA
TE+1');
  4* END;
SQL> /

PL/SQL procedure successfully completed.

SQL> COMMIT;

Commit complete.

--
-- Check whether the job is submitted
--
SQL> SELECT * FROM DBA_JOBS

      JOB LOG_USER                       PRIV_USER
--------- ------------------------------ ------------------------------
SCHEMA_USER                    LAST_DATE LAST_SEC THIS_DATE THIS_SEC
NEXT_DATE NEXT_SEC TOTAL_TIME B
------------------------------ --------- -------- --------- --------
--------- -------- ---------- - INTERVAL
------------------------------------------------------------------------
----------------------------
 FAILURES
---------
WHAT
------------------------------------------------------------------------
----------------------------
NLS_ENV
------------------------------------------------------------------------
----------------------------
MISC_ENV
INSTANCE
----------------------------------------------------------------
---------
        1 USER1                          USER1 
USER1                          17-FEB-03 20:01:20
18-FEB-03 08:00:00         16 N
SYSDATE+1
        0
PROCEDURE_NAME;
NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA' NLS_CURRENCY='$'
NLS_ISO_CURRENCY='AMERICA' NLS_NUME RIC_CHARACTERS='.,'
NLS_DATE_FORMAT='DD-MON-YY' NLS_DATE_LANGUAGE='AMERICAN'
NLS_SORT='BINARY'
0102000200000000
0

Regds,
Catherine
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: CHAN Chor Ling Catherine (CSC)
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: Ramon E. Estevez
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: Rajesh Dayal
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to