A: SHOW GRANTS OF ROLE shows who as been granted (Correct)
B: SHOW GRANTS TO ROLE show privileges granted
https://docs.snowflake.com/en/sql-reference/sql/show-grants.html
A: SHOW GRANTS OF ROLE this option shows which users and roles have access to a role,
while,
B: SHOW GRANTS TO ROLE this option only shows which roles have access to a role, is doesn't specify the user.
A is the answer..
List all roles and users who have been granted the analyst role:
SHOW GRANTS OF ROLE analyst;
List all privileges granted to the analyst role:
SHOW GRANTS TO ROLE analyst;
MY_ROLE doesn't have access to users and roles. It is the other way round - Users and roles were given access to MY_ROLE so SHOW GRANTS OF ROLE MY_ROLE.
It could A or B
Syntax
SHOW GRANTS
SHOW GRANTS ON ACCOUNT
SHOW GRANTS ON <object_type> <object_name>
SHOW GRANTS TO { ROLE <role_name> | USER <user_name> | SHARE <share_name> }
SHOW GRANTS OF ROLE <role_name>
SHOW GRANTS OF SHARE <share_name>
SHOW FUTURE GRANTS IN SCHEMA { <schema_name> }
SHOW FUTURE GRANTS IN DATABASE { <database_name> }
SHOW FUTURE GRANTS TO ROLE <role_name>
https://docs.snowflake.com/en/sql-reference/sql/show-grants.html
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
miadiesel
Highly Voted 1 year, 11 months ago[Removed]
Most Recent 2 months, 3 weeks agoAvi0407
1 year agoAvi0407
1 year agoAfzy
1 year agoRajivnb
1 year, 1 month agoMarge23
1 year, 2 months agotimcooks
1 year, 2 months agoPawPetrol
1 year, 3 months agoOscarWest2023
1 year, 5 months agookurok
1 year, 7 months agoSexyPotato
1 year, 8 months agoAndywu213
1 year, 10 months agoSV1122
1 year, 10 months agodb1290
1 year, 11 months agostornati
1 year, 11 months agotejarun
1 year, 11 months ago