Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: "Table must be declared" in procedure?
In article <956j20$22b$1_at_nnrp1.deja.com>,
mjgusa_at_my-deja.com wrote:
> Hi:
>
> I am trying to have a procedure insert data into the table of the
> caller's schema and getting an error telling me that the result
> table "must be declared". I am just doing something like:
> insert into otherguys.results (select whatever from mytable)
>
> The procedure is a definer rights procedure, owned by the same user
who
> owns mytable. I have even granted pretty much all privileges on both
> tables to all, but still I get this error trying to load the
> procedure. What's the real problem? Is there something like FORCE
> that I can use? I am using 8.1.7 on an NT.
>
> Thanks,
> Mike
>
I am not sure in your specific case, but a likely cause of the error
you are getting is this: in order for owner A to access owner B's
tables from within packaged code owner A must have a direct grant on
user B's objects. The grants can not be inherited from a role.
So as B try granting the necessary privileges directly to A and see if the compile errors go away. If not you should post the actual error messages.
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/Received on Tue Jan 30 2001 - 08:43:17 CST