Granting privileges on v_monitor and v_catalog schemas

Moderator: NorbertKrupa

Post Reply
shaz001
Newbie
Newbie
Posts: 13
Joined: Mon Jan 13, 2014 1:08 am

Granting privileges on v_monitor and v_catalog schemas

Post by shaz001 » Mon Mar 03, 2014 8:06 pm

Hi,

How to grant SELECT privileges on v_monitor and v_catalog tables to user? Some of the system tables are not accessible and getting the following error message?

select * from active_events;

ERROR: Permission denied for relation active_events

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Granting privileges on v_monitor and v_catalog schemas

Post by JimKnicely » Mon Mar 03, 2014 9:44 pm

Maybe try a DB view?

Example:

Code: Select all

dbadmin=> create user jim;
CREATE USER
dbadmin=> create view public.active_events_vw as select * from v_monitor.active_events;
CREATE VIEW
dbadmin=> grant select on public.active_events_vw to jim;
GRANT PRIVILEGE
dbadmin=> \c dbadmin jim
You are now connected to database "dbadmin" as user "jim".
jim=> select count(*) from public.active_events_vw;
 count 
-------
     3
(1 row)
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Granting privileges on v_monitor and v_catalog schemas

Post by NorbertKrupa » Mon Mar 03, 2014 9:54 pm

If that actually works I'll pleasantly surprised. The official word I got from Vertica is that you need dbadmin to query system tables (6.1.3). I'm guessing this is only possible with 7.0.
Checkout vertica.tips for more Vertica resources.

kodakalla
Newbie
Newbie
Posts: 9
Joined: Fri Jul 11, 2014 1:34 pm

Re: Granting privileges on v_monitor and v_catalog schemas

Post by kodakalla » Thu Oct 23, 2014 8:11 am

Even in 7.0 this is not working. Granted user can see the data, if that data is relevant to him/her.
Lets hope future versions of vertica will provide access to all data dictionary views/tables just with a simple grant
or via a role.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Granting privileges on v_monitor and v_catalog schemas

Post by NorbertKrupa » Thu Oct 23, 2014 2:22 pm

The functionality still doesn't exist as of 7.1. There is an enhancement request for this functionality and hopefully we will see it in future versions.
Checkout vertica.tips for more Vertica resources.

Post Reply

Return to “Vertica Database Administration”