SnowPro Associate: Platform Question 164
Single answer● Transfer ownershipA Snowflake administrator needs to transfer ownership of the SALES_DB database from the role ETL_ADMIN to the role DATA_PLATFORM_ADMIN as part of a team reorganization. Several schemas, tables, and views inside SALES_DB currently have privileges granted to downstream analyst roles. The administrator wants to avoid unintentionally removing those existing grants during the ownership transfer. Which command should the administrator use?
- A
GRANT OWNERSHIP ON DATABASE SALES_DB TO ROLE DATA_PLATFORM_ADMIN
- B
GRANT OWNERSHIP ON DATABASE SALES_DB TO ROLE DATA_PLATFORM_ADMIN COPY CURRENT GRANTS
- C
REVOKE OWNERSHIP ON DATABASE SALES_DB FROM ROLE ETL_ADMIN; GRANT OWNERSHIP ON DATABASE SALES_DB TO ROLE DATA_PLATFORM_ADMIN
- D
ALTER DATABASE SALES_DB SET OWNER = DATA_PLATFORM_ADMIN
Show answer and explanation
Correct answer: B
Explanation
In Snowflake, OWNERSHIP is a special privilege and is transferred with the GRANT OWNERSHIP command, not with ALTER statements or a separate revoke-and-grant sequence. When transferring ownership, administrators must pay close attention to how existing grants are handled. Using COPY CURRENT GRANTS preserves the current outbound privileges on the object, which helps avoid disrupting users or roles that already have access. This is especially important in production environments where databases, schemas, and other objects are already shared across teams. Snowflake documentation on access control and GRANT OWNERSHIP describes this behavior and highlights COPY CURRENT GRANTS as the appropriate option when existing grants should be retained during ownership transfer.
- A. Incorrect.
This command is incomplete for the stated goal. Although GRANT OWNERSHIP is the correct mechanism to transfer ownership in Snowflake, omitting COPY CURRENT GRANTS can affect existing outbound privileges on the object being transferred. In an exam scenario focused on preserving grants during ownership transfer, this is not the best answer.
- B. Correct.
This is correct. In Snowflake, ownership is transferred using GRANT OWNERSHIP. When the administrator wants to preserve existing privileges granted on the object, the COPY CURRENT GRANTS clause should be used. This is the practical choice when transferring ownership while minimizing disruption to roles that already depend on granted access.
- C. Incorrect.
This is incorrect because OWNERSHIP is not removed with a separate REVOKE OWNERSHIP statement before reassignment. In Snowflake, ownership transfer is handled directly through GRANT OWNERSHIP to the new role. This option reflects a common misconception that ownership behaves like a standard privilege that must be revoked first.
- D. Incorrect.
This is incorrect because Snowflake does not use ALTER DATABASE ... SET OWNER syntax to transfer ownership. Ownership changes are performed with the GRANT OWNERSHIP command. This distractor is plausible for candidates familiar with other database platforms, but it is not valid Snowflake syntax.