Active Session Roles

Moderator: NorbertKrupa

Post Reply
User avatar
usli06
Intermediate
Intermediate
Posts: 93
Joined: Wed Jan 25, 2012 4:53 am

Active Session Roles

Post by usli06 » Fri Aug 03, 2012 3:37 am

Hi guys,

Is there a simple way to check what roles are active for my session in vsql? Something like the session_roles table in Oracle which only lists the roles which are enabled for a session.

I was hoping there may be meta-command for this.

Thanks!

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

Re: Active Session Roles

Post by JimKnicely » Fri Aug 03, 2012 3:14 pm

Hi,

In vsql you can view which roles are enabled for the current user session like this:

Code: Select all

dbadmin=> SHOW enabled_roles;
     name      |         setting
---------------+--------------------------
 enabled roles | dbadmin, pseudosuperuser
(1 row)
Hope this helps!
Jim Knicely

Image

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

User avatar
usli06
Intermediate
Intermediate
Posts: 93
Joined: Wed Jan 25, 2012 4:53 am

Re: Active Session Roles

Post by usli06 » Fri Aug 03, 2012 9:22 pm

Thanks, Jim!

Is there anyway to query the active roles? I am asking because we may need to know the roles that are active so we can control what a user sees in a simple app we're creating that uses odbc to connect to the database. We are not using vsql.

Thanks for your help!

Post Reply

Return to “New to Vertica Database Administration”