Important SQL's for Greenplum DBA's

posted May 2, 2013, 3:56 PM by Sachchida Ojha
select count(*) from pg_tables where schemaname='sachi';
select rolname from pg_roles where rolcanlogin is TRUE; -- List users
select rolname from pg_roles where rolcanlogin is FALSE; --- List Roles
select * from pg_views ;
select * from information_schema.table_privileges;
select * from pg_user;
select * from pg_views where viewname like '%priv%';
select * from pg_views where viewname like '%role%';
select * from pg_views where viewname like '%gran%';
select * from pg_views where viewname like '%part%';
select * from pg_views where viewname like '%schema%';
select * from pg_views where viewname like '%stat%';
select * from information_schema.role_table_grants;
select * from information_schema.role_routine_grants;
select * from information_schema.applicable_roles;
select * from information_schema.enabled_roles;
select * from gp_toolkit.gp_roles_assigned;
Comments