hacto
hacto

Reputation: 21

snowflake - query grants to role

I made all table grants to a role:

grant select on all tables in               schema WORKING to role PROD_WORKING_SR;
grant select on all views  in               schema WORKING to role PROD_WORKING_SR;
grant select on future tables in            schema WORKING to role PROD_WORKING_SR;
grant select on future views  in            schema WORKING to role PROD_WORKING_SR;

but when I try to verify the grants using command:

show grants to role PROD_WORKING_SR

I get nothing. Can someone help me with a query that I can extract all privileges granted to a role like I did above.

Appreciate your help!!!

Upvotes: 2

Views: 283

Answers (1)

demircioglu
demircioglu

Reputation: 3465

You need to give USAGE privilege to the role for database and schema

You can do this using

grant usage on database <your db name> to role PROD_WORKING_SR;
grant usage on schema WORKING to role PROD_WORKING_SR;

Upvotes: 2

Related Questions