Re: Weird thing (access not granted to a table from a procedure

From: Bill Thorsteinson <billthor_at_yahoo.com>
Date: Mon, 24 Jun 2002 21:40:29 -0400
Message-ID: <laifhuo40idubjf5rp9e8j6udbvlub0g1o_at_4ax.com>


On Sun, 23 Jun 2002 15:51:41 +0200, "Antoine" <nospam_at_nospam.net> wrote:

>Hi,
>
>I have just created a procedure in a package with the system right.

System is not the schema to use when adding packages. If possible, created the packages in either the schema that owns the table, or a schema that owns the application code.

>From the system account, i can run sql commands like select * from
>username.tablename.
>
SQL command are run based on both directly granted access, and access granted to roles held by the schema.

>But, the procedure body is not compiled 'cause it pretends
>username.tablename should be declared first (and when i copy and paste the
>select statement, it runs perfectly, on the same account).
>
Grant access to the table directly to the package owner.

>Thx in advance
>
>Antoine
Received on Tue Jun 25 2002 - 03:40:29 CEST

Original text of this message