Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: I'm missing something obvious
In article <7q4g6g$dhg$1_at_nnrp1.deja.com>,
garysadler_at_my-deja.com wrote:
> I am trying to execute dbms_shared_pool from within a stored
> procedure owned by SYS, and getting privilege errors, even if SYS is
the
> user executing the procedure. Dbms_shared_pool is owned by SYS, as is
> dbms_utility. It's got something to do with roles because SYS can
> actually execute dbms_shared_pool from sqlplus, unless I issue SET
ROLE
> NONE, then try it. Why would SYS need a role to execute a package
that
> it owns?
>
> Here's the exact message I get when running sqlplus after SET ROLE
NONE:
>
> begin dbms_shared_pool.keep('owner.packagename'); end;
> *
> ERROR at line 1:
> ORA-01031: insufficient privileges
> ORA-06512: at "SYS.DBMS_UTILITY", line 68
> ORA-06512: at "SYS.DBMS_SHARED_POOL", line 43
> ORA-06512: at "SYS.DBMS_SHARED_POOL", line 51
> ORA-06512: at line 1
>
> Oracle 8.1.5
> Solaris 2.6
>
> Gary Sadler
> Polygon Network
> gary_at_polygon.net
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Hi.
As I remember, the privilege must be granted directly
( NOT via role ).
Try
"GRANT EXECUTE ON SYS.DBMS_SHARED_POOL TO PUBLIC ( or
any user name )".
Good luck. Michael.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Sat Aug 28 1999 - 07:12:48 CDT