Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Help in granting privileges to a role and assiging this role to a user

Re: Help in granting privileges to a role and assiging this role to a user

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Wed, 23 Jul 2003 23:30:39 +0200
Message-ID: <cgvthv4oesnugtgdbms4b1u4i2d8op18d9@4ax.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US