nerdexam
Snowflake

COF-C02 · Question #686

A user needs to create a materialized view in the schema MYDB.MYSCHEMA. Which statements will provide this access?

The correct answer is D. GRANT ROLE MYROLE TO USER USER1. Creating a materialized view in a specific schema requires a layered set of privileges. The complete minimum set includes: USAGE on the database (MYDB), USAGE on the schema (MYSCHEMA), and CREATE MATERIALIZED VIEW on the schema (MYSCHEMA). The correct answer (D) represents the…

Account Access and Security

Question

A user needs to create a materialized view in the schema MYDB.MYSCHEMA. Which statements will provide this access?

Options

  • AGRANT ROLE MYROLE TO USER USER1;
  • BGRANT ROLE MYROLE TO USER USER1;
  • CGRANT ROLE MYROLE TO USER USER1;
  • DGRANT ROLE MYROLE TO USER USER1;

How the community answered

(45 responses)
  • A
    9% (4)
  • B
    2% (1)
  • C
    2% (1)
  • D
    87% (39)

Explanation

Creating a materialized view in a specific schema requires a layered set of privileges. The complete minimum set includes: USAGE on the database (MYDB), USAGE on the schema (MYSCHEMA), and CREATE MATERIALIZED VIEW on the schema (MYSCHEMA). The correct answer (D) represents the grant statement that includes all three of these necessary privilege grants assigned to the role, which is then granted to the user. Options A, B, and C are incomplete - they are missing one or more of the required privileges, such as CREATE MATERIALIZED VIEW on the schema or USAGE on the database/schema objects.

Topics

#Role-Based Access Control (RBAC)#Privileges#Materialized Views#User Management

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice