nerdexam
Snowflake

ARA-C01 · Question #98

Role A has the following permissions: - USAGE on db1 - USAGE and CREATE VIEW on schemal in db1 - SELECT on tablel in schemal Role B has the following permissions: - USAGE on db2 - USAGE and CREATE…

The correct answer is B. use database db2. This command will fail because while the user has USAGE permission on db2 and schema2 through Role B, and can create a view in schema2, they do not have SELECT permission on db1.schemal.table1 with Role B. Since Role A, which has SELECT permission on db1.schemal.table1, is not…

Security and Compliance

Question

Role A has the following permissions:

  • USAGE on db1
  • USAGE and CREATE VIEW on schemal in db1
  • SELECT on tablel in schemal

Role B has the following permissions:

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

A user has Role A set as the primary role and Role B as a secondary role. What command will fail for this user?

Options

  • Ause database db1;
  • Buse database db2;
  • Cuse database db2;
  • Duse database db1;

How the community answered

(64 responses)
  • A
    5% (3)
  • B
    89% (57)
  • C
    2% (1)
  • D
    5% (3)

Explanation

This command will fail because while the user has USAGE permission on db2 and schema2 through Role B, and can create a view in schema2, they do not have SELECT permission on db1.schemal.table1 with Role B. Since Role A, which has SELECT permission on db1.schemal.table1, is not the currently active role when the view v2 is being created in db2.schema2, the user does not have the necessary permissions to read from db1.schemal.table1 to create the view. Snowflake's security model requires that the active role have all necessary permissions to execute the command.

Topics

#Roles#Permissions#Primary and Secondary Roles

Community Discussion

No community discussion yet for this question.

Full ARA-C01 Practice