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 -> DBMS_JOB.SUBMIT bug?

DBMS_JOB.SUBMIT bug?

From: Andrew Woods <awoods_at_one.net>
Date: Fri, 27 Aug 1999 20:22:34 -0400
Message-ID: <37c72bc7_3@news1.one.net>


I wrote a stored procedure called DBMS_JOB_SUBMIT which takes the same arguments as DBMS_JOB.SUBMIT, then calls DBMS_JOB.SUBMIT for me. This stored procedure is in the same package as a function called USER_JOBS_COUNT which returns to me the number of jobs currently in the USER_JOBS table for that user (user 'a' just for example). The package itself is owned by user 'a'. When I log in to sqlplus as user 'b' (who has been granted the right to execute the package) and call DBMS_JOB_SUBMIT, it puts a record into USER_JOBS like this:

job: 1
log_user: 'b'
priv_user: 'a'
...

which seems to be fine (as I understand it the owner of the job is 'a'). The problem I'm having is when I call the USER_JOBS_COUNT function (still logged in as user 'b') to return the number of jobs, which in this example should be 1, but the function returns 0. If I log in as user 'a' and make the same function call, it returns the correct number, 1. I understand that user 'b' would only see the jobs he owns (and in that case 0 is correct), but since I am executing the count query via a stored procedure in a package owned by 'a', shouldn't it return 1, since the query should actually be executing as the owner (user 'a') of the package (this is 8.0.5)?

Am I missing something, or does this sound like a bug? Received on Fri Aug 27 1999 - 19:22:34 CDT

Original text of this message

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