Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help in granting privileges to a role and assiging this role to a user
On 23 Jul 2003 14:05:08 -0700, avsrk_at_mailcity.com (Subrahmanyam Arya)
wrote:
>Dear oracle gurus,
>
>I have created a procedure that does the following
> 1] checks if a role "my_role" exists and if not creates the role
>
> 2] It grants create session privilege to this role with admin option
>
> 3] I am doing a select grant on objects of type VIEW and owned by
><A_OWNER>
> select Object_name form all_objects where owner='A_OWNER' and
>object_type='VIEW';
> grant select on <A_OWNER>.object_name to <my_role>
>
>This procedure is executed as <A_OWNER> himself.
>
>Inside my java code, i grant this role "my_role" to a user.
>
>However, the first 2 seems to have taken into affect but the 3 select
>grant does not seem to take into affect
>
>-any help,
>thanks,
>avsrk
Views are compiled. Any compiled object will need to be granted directly or using authid current_user (procedures, functions), because roles are ignored by compiled code, as roles are volatile
Sybrand Bakker, Senior Oracle DBA
To reply remove -verwijderdit from my e-mail address Received on Wed Jul 23 2003 - 16:30:39 CDT