Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Invoker Rights - Am I missing Something.
I modified the package body to testme1 as follows:
CREATE OR REPLACE PACKAGE BODY testme1 IS procedure process is jobnum
INTEGER; stmnt VARCHAR2(1000); x integer; BEGIN insert into test values
(9, 9, 9); commit; stmnt :='insert into test values (1, 2, 3);';
DBMS_JOB.submit(jobnum, stmnt, sysdate); END process; end testme1;
(1) The extra job for the "commit" was perhaps a misunderstanding of
what was recommended. This was omitted.
(2) Included in the dbms_job.submit was the third parameter with
"sysdate" as value. This was recommended by a previous respondant.
Make sure job_queue_processes is at least 1. You can set this dynamically through "alter system set job_queue_processes=1;" if it is not already set.
After you execute the query, you will see the job in the queue by querying user_jobs: "select job,what from dba_jobs;" However, after about a minute or so, the job will leave the queue and you will see the record in the test table.
Frank Hubeny
-- Posted via dBforums http://dbforums.comReceived on Fri May 11 2001 - 17:15:28 CDT