Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> DBMS_JOB.SUBMIT bug?
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
![]() |
![]() |