QuestionQ68

Secure Data Sharing and Consumption

Role A has these permissions:

  • USAGE on db1
  • USAGE and CREATE VIEW on schema1 in db1
  • SELECT on table1 in schema1

Role В has these permissions:

  • USAGE on db2
  • USAGE and CREATE VIEW on schema2 in db2
  • SELECT on table2 in schema2

A user has Role A as the primary role and Role В as a secondary role.

Which command will fail for this user?

Explanation

Snowflake authorizes CREATE <object> statements using the primary role. The primary role has no CREATE VIEW privilege on schema2 in db2, so it cannot create v2 there. Secondary roles can authorize non-creation SQL actions but do not supply the authorization for creating the view.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!