Re: Stored procedures and functions

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/06/30
Message-ID: <962389392.19452.3.pluto.d4ee154e_at_news.demon.nl>#1/1


You have privilege through a role and roles are not enabled during stored procedures. On Oracle 8.1.5 and higher you could define your procedure with invoker rights. In older releases you have to either grant the privileges directly to user2
or
connected as user2 execute the procedure user1.procedure.

Hth,

Sybrand Bakker, Oracle DBA

"iks" <oopsik_at_poczta.onet.pl> wrote in message news:8jik9j$ese$1_at_sunsite.icm.edu.pl...
> Hello,
>
> I have function which run select-query on table owned by USER1.
> When I try to compile this function as USER2 - error occurs:
> "Variable 'customers' should be declared" or something like
> this. 'Customers' there is a name of table. USER2 has
> DBA privilege and can select/update/insert etc.etc. on this table.
>
> When I compile this function as USER1 everything is OK,
> function works fine but only for USER1. When I try to execute
> this function as USER2 error occurs: 'Function/Package is in invalid
 state'.
> What is the reason ? Exectute right to function is granted but it desn't
> work.
>
> Regards,
>
> Grzegorz
>
>
>
>
>
>
>
>
Received on Fri Jun 30 2000 - 00:00:00 CEST

Original text of this message