Exam SnowPro Core All QuestionsBrowse all questions from this exam
Question 234

Which Snowflake SQL statement would be used to determine which users and roles have access to a role called MY_ROLE?

    Correct Answer: A

    To identify which users and roles have access to a specific role called MY_ROLE in Snowflake, the correct SQL statement is 'SHOW GRANTS OF ROLE MY_ROLE'. This command lists all users and roles to which the specified role has been granted, providing a clear view of access privileges related to that role.

Discussion
miadieselOption: A

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

Avi0407Option: B

List all privileges granted to the ROLE role: https://docs.snowflake.com/en/sql-reference/sql/show-grants SHOW GRANTS TO ROLE analyst; +---------------------------------+------------------+------------+------------+------------+--------------+------------+ | created_on | privilege | granted_on | name | granted_to | grant_option | granted_by | |---------------------------------+------------------+------------+------------+------------+--------------+------------+ | Wed, 17 Dec 2014 18:19:37 -0800 | CREATE WAREHOUSE | ACCOUNT | DEMOENV | ANALYST | false | SYSADMIN | +---------------------------------+------------------+------------+------------+------------+--------------+------------+

SV1122Option: A

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.

Avi0407Option: A

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;

OscarWest2023Option: A

https://docs.snowflake.com/en/sql-reference/sql/show-grants#examples

Andywu213Option: A

Answer is A SHOW GRANTS OF... ROLE role_name Lists all users and roles to which the role has been granted.

db1290Option: A

Answer is A. SHOW OF ROLE and SHOW TO ROLE has different outputs.

tejarunOption: A

https://docs.snowflake.com/en/sql-reference/sql/show-grants.html

AfzyOption: B

Answer is B SHOW GRANTS TO ROLE <role_name>;

RajivnbOption: A

OF is correct.

Marge23Option: A

correct

timcooksOption: B

SHOW GRANTS TO ROLE //Is the correct one else One can check on worksheet.

PawPetrolOption: A

Ans is A

okurokOption: A

https://docs.snowflake.com/en/sql-reference/sql/show-grants#:~:text=to%20the%20share.-,SHOW%20GRANTS%20OF,-...

SexyPotatoOption: A

A is correct.

stornatiOption: A

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