SOL-C01 · Question #140
SOL-C01 Question #140: Real Exam Question with Answer & Explanation
The correct answer is C: REVOKE ALL PRIVILEGES ON WAREHOUSE loading_wh FROM ROLE PUBLIC; GRANT USAGE ON WAREHOUSE loading_wh TO ROLE data_loader;. The GRANT USAGE ON WAREHOUSE command grants the specified role the privilege to use the warehouse for executing queries and loading data. OPERATE' (B) is not a valid privilege for warehouses. 'ALL PRIVILEGES (C) is too broad and grants unnecessary permissions. There is no `WAREHO
Question
A Snowflake administrator wants to ensure that a specific virtual warehouse used for data loading is only accessible by users with the 'DATA LOADER' role. Which of the following SQL commands is the MOST secure and effective way to achieve this, preventing unauthorized users from using the warehouse? A. B. C. D. E.
Options
- AGRANT USAGE ON WAREHOUSE loading_wh TO ROLE data_loader; REVOKE USAGE ON WAREHOUSE loading_wh FROM ROLE PUBLIC;
- BGRANT USAGE ON WAREHOUSE loading_wh TO ROLE data_loader;
- CREVOKE ALL PRIVILEGES ON WAREHOUSE loading_wh FROM ROLE PUBLIC; GRANT USAGE ON WAREHOUSE loading_wh TO ROLE data_loader;
- DALTER WAREHOUSE loading_wh SET WAREHOUSE_SIZE = 'X-SMALL'; GRANT USAGE ON WAREHOUSE loading_wh TO ROLE data_loader;
- ECREATE WAREHOUSE loading_wh WITH WAREHOUSE_SIZE = 'X-SMALL' AUTO_SUSPEND = 60 AUTO_RESUME = TRUE; GRANT USAGE ON WAREHOUSE loading_wh TO ROLE data_loader;
Explanation
The GRANT USAGE ON WAREHOUSE command grants the specified role the privilege to use the warehouse for executing queries and loading data. OPERATE' (B) is not a valid privilege for warehouses. 'ALL PRIVILEGES (C) is too broad and grants unnecessary permissions. There is no `WAREHOUSE_TYPE = 'RESTRICTED" option, so (D) is incorrect. Changing the 'OWNER (E) is not best practice for managing user access rights; is the correct privilege to grant.
Topics
Community Discussion
No community discussion yet for this question.