Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Set Role From a Stored Procedure
We did this within a package, which is very similar.
We define ReturnCode as an integer
ReturnCode := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(ReturnCode, '<grant statement goes here>', dbms_sql.v7);
DBMS_SQL.CLOSE_CURSOR(ReturnCode);
The only problem that we had was that we had to grant the owner of the package explicit GRANT ANY ROLE rights. Even with the owner having the DBA role it didn't work.
Hope it helps.
-- Chad Hegerty (chad.hegerty_at_rossnutrition.com) Ross Products Division - Abbott Laboratories Bob England <rengland_at_apci.net> wrote in article <5osl23$npq_at_queeg.apci.net>...Received on Thu Jun 26 1997 - 00:00:00 CDT
> Is anyone familiar with a way to issue a Set Role from within a stored
> procedure? Thanks.
>
>