This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a script to find a list of Roles with its associated member information in Greenplum.
Greenplum provides workload management using the concept of Resource Queues so for that DBA should know about Roles and their members.
Using below script, you can get the information of Greenplum Roles and its members/users information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
select t.rarolename as RoleName ,t.ramembername as RoleMember from pg_roles pr, ( select gra.rarolename, gra.ramembername from pg_roles spr, gp_toolkit.gp_roles_assigned gra where gra.rarolename = spr.rolname and spr.rolcanlogin = 'f' ) as t where pr.rolcanlogin = 'f' and pr.rolname = t.rarolename order by t.rarolename, t.ramembername; |