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

Home -> Community -> Usenet -> c.d.o.server -> Re: Invoker Rights - Am I missing Something.

Re: Invoker Rights - Am I missing Something.

From: Scott Watson <swatson_at_datachest.com>
Date: Fri, 11 May 2001 16:11:07 GMT
Message-ID: <vaUK6.16007$yw.546717@news20.bellglobal.com>

I read somewhere that after submitting a job it is always advisable to issue a commit; I don't remember the exact reason but it had something to do with the job not running.

However to get you code to work as you laid it out I would do something like

     stmnt := 'insert into test values (1, 2, 3); commit;';
     DBMS_JOB.submit(jobnum, stmnt);
     commit;


HTH
Scott.

"SMiller" <____steve.miller_at_redeye.com> wrote in message news:HRTK6.61461$PP3.4242226_at_nnrp3.clara.net...
> Oracle 8.1.7 on Linux.
> ----------------------
> I have 2 users created......A and B.
>
> I perform the following in B.
> create table test (one number, two number, three number);
> grant insert, update, delete on test to public;
>
> Then, I perform the following in A.
>
> CREATE OR REPLACE PACKATE testme1
> authid current_user IS
>
> Procedure process;
>
> end testme1;
>
> CREATE OR REPLACE PACKAGE BODY testme1 IS
>
> procedure process is
> jobnum INTEGER;
> stmnt VARCHAR2(1000);
> x integer;
> BEGIN
> insert into redeyedev.test values (9, 9, 9);
> commit;
> stmnt := 'insert into test values (1, 2, 3);';
> DBMS_JOB.submit(jobnum, stmnt);
> stmnt := 'commit;';
> DBMS_JOB.submit(jobnum, stmnt);
>
> END process;
>
> end testme1;
>
> Finally I perform the following in B.
> exec a.testme1.process;
>
> Table test has 9, 9, 9 inserted as expected.
> BUT
> DBA_JOBS has the job in the jobqueue but it does not get run.
> Table test does not have 1, 2, 3 inserted as the job has not been
 executed.
>
> Am I missing a grant somewhere, or is the above example not possible?
>
> Is there a better way of doing this?
>
>
>
>
Received on Fri May 11 2001 - 11:11:07 CDT

Original text of this message

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