nerdexam
Snowflake

ADA-C01 · Question #2

The following SQL command was executed: Use role SECURITYADMIN; Grant ownership On future tables In schema PROD. WORKING To role PROD_WORKING_OWNER; Grant role PROD_WORKING_OWNER to role SYSADMIN…

The correct answer is C. PROD_WORKING_OWNER, ACCOUNTADMIN, and SYSADMIN can alter or drop table XYZ. The ownership privilege grants full control over the table and can only be held by one role at a time. However, the current owner can also grant the ownership privilege to another role, which transfers the ownership to the new role. In this case, the SECURITYADMIN role granted…

Account Management and Security

Question

The following SQL command was executed:

Use role SECURITYADMIN; Grant ownership On future tables In schema PROD. WORKING To role PROD_WORKING_OWNER; Grant role PROD_WORKING_OWNER to role SYSADMIN; Use role ACCOUNTADMIN; Create table PROD.WORKING.XYZ (value number) ; Which role(s) can alter or drop table XYZ?

Options

  • ABecause ACCOUNTADMIN created the table, only the ACCOUNTADMIN role can alter or drop
  • BSECURITYADMIN, SYSADMIN, and ACCOUNTADMIN can alter or drop table XYZ.
  • CPROD_WORKING_OWNER, ACCOUNTADMIN, and SYSADMIN can alter or drop table XYZ.
  • DOnly the PROD_WORKING_OWNER role can alter or drop table XYZ.

How the community answered

(29 responses)
  • A
    7% (2)
  • B
    17% (5)
  • C
    72% (21)
  • D
    3% (1)

Explanation

The ownership privilege grants full control over the table and can only be held by one role at a time. However, the current owner can also grant the ownership privilege to another role, which transfers the ownership to the new role. In this case, the SECURITYADMIN role granted the ownership privilege on future tables in the PROD.WORKING schema to the PROD_WORKING_OWNER role. This means that any table created in that schema after the grant statement will be owned by the PROD_WORKING_OWNER role. Therefore, the PROD_WORKING_OWNER role can alter or drop table XYZ, which was created by the ACCOUNTADMIN role in the PROD.WORKING schema. Additionally, the ACCOUNTADMIN role can also alter or drop table XYZ, because it is the top-level role that has all privileges on all objects in the account. Furthermore, the SYSADMIN role can also alter or drop table XYZ, because it was granted the PROD_WORKING_OWNER role by the SECURITYADMIN role. The SYSADMIN role can activate the PROD_WORKING_OWNER role and inherit its privileges, including the ownership privilege on table XYZ. The SECURITYADMIN role cannot alter or drop table XYZ, because it does not have the ownership privilege on the table, nor does it have the PROD_WORKING_OWNER role.

Topics

#future grants#ownership#role hierarchy#table privileges

Community Discussion

No community discussion yet for this question.

Full ADA-C01 Practice