Re: insufficient privileges error help

  • From: Toon Koppelaars <toon.koppelaars@xxxxxxxxxxx>
  • To: epipko <epipko@xxxxxxxxxxxx>
  • Date: Fri, 19 Nov 2010 20:33:41 +0100

The user creating the view requires a direct object privilege (SELECT in
this case) on v$database.

For instance as user SYS:

grant select on v_$database to [the user];

And revoke the DBA role and the CREATE ANY VIEW sys privilege (assuming a
simple CREATE VIEW priv is in place). They are not required.


On Fri, Nov 19, 2010 at 8:23 PM, Eugene Pipko <epipko@xxxxxxxxxxxx> wrote:

>  Hi all,
>
> I am running  11.2 d/b on Oracle Linux 5.
>
> I wanted to grant users select on one column (name) in a sys table
> (v$database).
>
> Couldn’t find any solutions, but to create a view:
>
>
>
> create or replace view db_name_v
>
> as
>
> (
>
> Select  name database_name,
>
>               decode(rtrim(name),'TAURUS',   'Prod') environment
>
> from v$database
>
> )
>
> ;
>
>
>
> The user which creates a view has was granted DBA role and CREATE ANY VIEW
> privs.
>
> When I try to create a view I get:
>
>
>
> SQL> create or replace view db_name_v
>
>   2  as
>
>   3  (
>
>   4  Select  name database_name,
>
>   5                decode(rtrim(name),'TAURUS',   'Prod') environment
>
>   6  from v$database
>
>   7  )
>
>   8  ;
>
> from v$database
>
>      *
>
> ERROR at line 6:
>
> ORA-01031: insufficient privileges
>
>
>
> What else can I check?
>
>
>
>
>
> Thanks,
>
> Eugene
>
>
>



-- 
Toon Koppelaars
RuleGen BV
Toon.Koppelaars@xxxxxxxxxxx
www.RuleGen.com
TheHelsinkiDeclaration.blogspot.com

(co)Author: "Applied Mathematics for Database Professionals"
www.RuleGen.com/pls/apex/f?p=14265:13

Other related posts: