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 2 years, 4 months ago[Removed]
Most Recent 8 months, 2 weeks agoAvi0407
1 year, 6 months agoAvi0407
1 year, 6 months agoAfzy
1 year, 6 months agoRajivnb
1 year, 6 months agoMarge23
1 year, 7 months agotimcooks
1 year, 8 months agoPawPetrol
1 year, 9 months agoOscarWest2023
1 year, 11 months agookurok
2 years, 1 month agoSexyPotato
2 years, 2 months agoAndywu213
2 years, 4 months agoSV1122
2 years, 4 months agodb1290
2 years, 5 months agostornati
2 years, 5 months agotejarun
2 years, 5 months ago