This domain is about 20% of the exam, roughly 20 of its 100 questions.
Every point below comes from Snowflake's official documentation; each section lists its sources.
Domain 2 · Overview
This domain is about 20% of the exam, roughly 20 of its 100 questions.
Every point below comes from Snowflake's official documentation; each section lists its sources.
Up next: Explain Snowflake security model and principles · 11 steps + check · 8 min
Domain 2 · Topic 1 of 3
Step 1 of 11
Think first How do roles, ownership and policies combine to decide whether a Snowflake user can sign in and run a given statement?
Why it matters: Questions describe an access or login problem and ask which role, grant or policy explains it or fixes it.
Snowflake grants privileges to roles, and every object has one owning role that can share access. Roles inherit privileges upward through a hierarchy. Network policies are checked before authentication policies, and a blocked IP stops evaluation.
Step 2 of 11
| Term | Meaning |
|---|---|
| Securable object | An object owned by a single role, which by default is the role used to create it. |
| Role hierarchy | Roles granted to other roles, so a parent role inherits every privilege of the roles below it. |
| Managed access schema | A schema where only its owner or a role with MANAGE GRANTS can grant privileges on its objects. |
| Secondary roles | Roles activated in a session beside the primary role; CREATE statements still rely on the primary role. |
| Network policy | A rule whose blocked list stops requests by IP address once it is activated for an account, user or security integration. |
Step 3 of 11
Access comes from roles (RBAC) and from object owners (DAC). Privileges go to roles, and roles go to users. Each object also has one owning role that can grant access to it. A privilege granted to a role flows up to every parent role in the hierarchy.
Role-based and discretionary access control compared
| Feature | Role-based (RBAC) | Discretionary (DAC) |
|---|---|---|
| Core idea | Privileges are given to roles, which are given to users | Every object has an owner that can share access to it |
| What decides access | Privileges held by the role or inherited from roles below it | The owning role, by default the role that created the object |
Exam trap Owning a role is not the same as being above it in the hierarchy. The owner role does not inherit the owned role's privileges; only a role hierarchy passes privileges on.
Step 4 of 11
ACCOUNTADMIN sits on top and contains SYSADMIN and SECURITYADMIN. USERADMIN holds CREATE USER and CREATE ROLE. These built-in roles can never be dropped, and their built-in privileges cannot be revoked. Keep ACCOUNTADMIN to a few users, require MFA for them, and give them a lower default role such as SYSADMIN.
Exam trap MANAGE GRANTS is not held by every admin role. By default only ACCOUNTADMIN and SECURITYADMIN have it, and it lets the holder see every object.
Step 5 of 11
Database roles work only after they are granted to an account role. A session can activate account roles but never a database role directly. Build custom roles as a hierarchy whose top role is granted to SYSADMIN. Creating any role needs USERADMIN or higher, or CREATE ROLE on the account.
Exam trap Seeing a database role is not the same as using it. Any privilege on the database lets a role list its database roles, but they still must be granted to an account role. They also do not appear in the roles graph.
Step 6 of 11
Object privileges also need access to the database and schema around them. A role needs USAGE or another privilege on the container database and schema before it can work with an object inside. In a managed access schema, object owners lose grant rights. A holder of MANAGE GRANTS can even grant privileges straight to users.
Example: Gives a role SELECT on every table that already exists in one schema.
GRANT SELECT ON ALL TABLES IN SCHEMA my_db.my_schema
TO ROLE my_role;
ON ALL TABLES IN SCHEMA: covers existing tables only, not tables created laterExam trap A grant on all tables in a schema does not cover tables created afterward. Those need a separate grant on future tables.
Step 7 of 11
EXPLAIN_PRIVILEGES names exactly which privileges a failed statement lacks. To run it on your own query, you need at least one privilege on the objects involved. Set missing_only to true to list only what is still needed. With for_role, it checks that role together with its granted roles.
Exam trap Without at least one privilege on the objects, you cannot call this function on your query. Grant RESOLVE ALL ON ACCOUNT to someone who must diagnose access problems without them.
Step 8 of 11
CREATE statements are always authorized by the primary role. At login, the user's default role and default secondary roles become active automatically. USE SECONDARY ROLES with ALL or NONE then changes how secondary roles are handled. Even with secondary roles active, creating an object relies on the primary role.
The two USE SECONDARY ROLES settings compared
| Feature | ALL | NONE |
|---|---|---|
| Secondary roles in use | Worked out again as each statement runs | Turned off for the session |
| Who authorizes CREATE statements | The primary role, even with secondary roles active | The primary role, which authorizes all SQL actions |
Exam trap ALL does not lock in the roles you hold when you run it. Role grants are checked per statement, so a newly granted role becomes active without another command.
Step 9 of 11
Network policies are checked first, and they do nothing until activated. If the network policy blocks a request's IP address, evaluation stops there. Authentication policies then set allowed methods, such as SAML, OIDC, OAuth, key pairs and passwords. MFA second factors include passkeys, authenticator apps and Duo.
Network and authentication policies compared
| Feature | Network policy | Authentication policy |
|---|---|---|
| Order of checks | Evaluated first; a blocked IP ends evaluation | Checked only after the network policy lets the request through |
| Most specific level wins | Security integration overrides both account and user | User-level policy overrides the account-level policy |
Exam trap Blocking client types in an authentication policy is not a firm security boundary. CLIENT_TYPES is best effort, so pair it with other controls.
Step 10 of 11
Logged messages from handler code land in an event table. Telemetry collection must be turned on before any messages are collected. The log level controls which severities are kept. Snowflake Scripting logs with SYSTEM$LOG. Request and response translators in external functions cannot log at all.
Exam trap A log call inside a UDF's row handler is not written once per query. It runs for every row, so a large table can flood the event table.
Step 11 of 11
Sources: Overview of Access Control | Snowflake Documentation · Configuring access control | Snowflake Documentation · Authentication policies | Snowflake Documentation · USE SECONDARY ROLES | Snowflake Documentation · Controlling network traffic with network policies | Snowflake Documentation · Access control best practices | Snowflake Documentation · SHOW DATABASE ROLES | Snowflake Documentation · Troubleshooting access control issues | Snowflake Documentation
Check
Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.
Up next: Define data governance features and how they are used · 11 steps + check · 8 min
Domain 2 · Topic 2 of 3
Step 1 of 11
Think first How do masking policies, tags, privacy policies and encryption work together to protect sensitive data in Snowflake?
Why it matters: Questions describe a governance need and ask which feature, privilege, limit or key setting meets it.
Snowflake protects data in layers. Masking and aggregation policies control what a query returns, while tags label objects so policies can follow them. Underneath, all customer data is encrypted by default with a managed key hierarchy.
Step 2 of 11
| Term | Meaning |
|---|---|
| Masking policy | A schema-level rule that masks column values at query time without changing stored data. |
| Tag | A schema-level object that stores a string value on an object as a key-value pair. |
| External Tokenization | Swaps sensitive values for tokens before loading and detokenizes them at query time. |
| Composite master key | The Tri-Secret Secure key built from a Snowflake key and a customer-managed key. |
| Entity key | Tells an aggregation policy to count unique entities instead of rows. |
Step 3 of 11
Column-level security is Dynamic Data Masking plus External Tokenization. Both rely on masking policies applied at query time. Dynamic Data Masking never rewrites the table, so there is no static masking. External Tokenization stores tokens instead, and an external function restores the values at query runtime.
Dynamic Data Masking and External Tokenization compared
| Feature | Dynamic Data Masking | External Tokenization |
|---|---|---|
| Stored data | Plain text, left unchanged in the table | Tokens, written before the data is loaded |
| At query time | A masking policy masks the value | A masking policy with an external function detokenizes it |
| Collisions | Possible when the policy uses a hash function | None, since each input maps to exactly one token |
Exam trap Dynamic Data Masking never changes what is stored. The table keeps its plain-text values; only query results are masked.
Step 4 of 11
A column takes only one masking policy at a time. The policy's input and output data types must match. Editing the policy body updates every column that uses it, with no reapplying. To drop a policy, first unset it from the column with an ALTER VIEW … MODIFY COLUMN or ALTER TABLE … MODIFY COLUMN statement.
Exam trap Dropping a masking policy that is still set on a column fails. Unset it on the column first, then run the drop again.
Step 5 of 11
Object owners cannot unset a masking policy or see the data it hides. The APPLY privilege on a masking policy lets a role set and unset it. Dynamic Data Masking itself can keep even ACCOUNTADMIN and SECURITYADMIN from viewing protected data needlessly. Use IS_ROLE_IN_SESSION when conditions must respect role hierarchy. Inside a policy body, CURRENT_DATABASE returns the protected table's database, not the session's.
Exam trap Owning a table does not let a role read or remove its masking. The OWNERSHIP privilege alone cannot unset a masking policy.
Step 6 of 11
A tag is a schema-level object whose value is always a string. One object can carry at most 50 tags. Tags flow down the hierarchy, so a table tag reaches every column. ALLOWED_VALUES caps a tag at 5,000 values of up to 256 characters. Removing an allowed value leaves existing assignments as they are. UNDROP TAG restores a dropped tag and its assignments within 24 hours.
Exam trap Automatic propagation of user-defined tags is not in every edition. It requires Enterprise Edition or higher.
Step 7 of 11
A policy on a tag protects every tagged column of a matching data type. System tags cannot take masking policies. A table protected this way cannot back a materialized view. When a provider shares a database or schema, its tag-based policies still apply in the consumer account.
Direct and tag-based masking policies compared
| Feature | Direct assignment | Tag-based |
|---|---|---|
| Set on | A single column | A tag, then every tagged column whose type matches |
| Limit | One masking policy per column | One masking policy per data type per tag |
| When both protect a column | Wins over the tag-based policy | Is overridden by the direct policy |
Exam trap When a column has both a direct and a tag-based policy, the tag does not win. The directly assigned policy takes precedence.
Step 8 of 11
Masking policies run before aggregation policies. An aggregation policy sets a minimum group size for query results. With an entity key, that minimum counts unique entities rather than rows. Each entity key maps to at most 1 policy, and only 1 policy may serve row-level privacy.
Exam trap Masking is not applied to results after they are aggregated. Masking policies run ahead of aggregation policies.
Step 9 of 11
All customer data is AES-encrypted by default under a key hierarchy. The hierarchy has 4 levels: root, account master, table master and file keys. Snowflake rotates managed keys once they are over 30 days old. Tri-Secret Secure adds a customer-managed key, forming a composite master key. You register it with SYSTEM$REGISTER_CMK_INFO. Revoke it, and Snowflake can no longer decrypt the data.
Exam trap Files bound for an internal stage are not sent in plain text. The client encrypts them before upload, and they are encrypted again in the stage.
Step 10 of 11
Trust Center's Security Essentials scanners run monthly by default. By default they email verified Admin users only about critical findings. To find every object a masking policy is set on, query the POLICY_REFERENCES view. After a failover, failover group objects become writable on the promoted account and read-only on the former primary.
Exam trap The
QUERY_HISTORYview does not list masking policy names. UsePOLICY_REFERENCESto find the objects a policy protects.
Step 11 of 11
Sources: Understanding Column-level Security | Snowflake Documentation · Introduction to object tagging | Snowflake Documentation · Implementing entity-level privacy with aggregation policies | Snowflake Documentation · Understanding Encryption Key Management in Snowflake | Snowflake Documentation · Advanced Column-level Security topics | Snowflake Documentation · Understanding Dynamic Data Masking | Snowflake Documentation · Work with object tags | Snowflake Documentation · Tag-based masking policies | Snowflake Documentation
Check
Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.
Up next: Explain monitoring and cost management · 11 steps + check · 7 min
Domain 2 · Topic 3 of 3
Step 1 of 11
Think first How would you cap warehouse spending in an account and then work out where its credits actually went?
Why it matters: Questions describe a spending or monitoring need and ask which resource monitor setting, budget or usage view fits it.
Resource monitors set a credit quota on warehouses and act when thresholds are reached. Budgets cover the serverless and AI spending that monitors cannot track. ACCOUNT_USAGE views then keep 1 year of history to explain where credits went.
Step 2 of 11
| Term | Meaning |
|---|---|
| Resource monitor | An object that sets a credit quota for warehouses and notifies or suspends them at thresholds. |
| Credit quota | The credits a monitor allows, counting warehouse use plus the cloud services that support it. |
| Budget | A spending limit that can also track serverless features and AI services, not only warehouses. |
| Query load | Query execution time in an interval divided by the interval's length, both in seconds. |
| ACCOUNT_USAGE | A schema in the shared SNOWFLAKE database that holds usage views such as WAREHOUSE_METERING_HISTORY. |
Step 3 of 11
An account has one account monitor; each warehouse has at most one monitor. The account monitor watches credit use of every warehouse in the account. A warehouse monitor can watch several warehouses at once. Only ACCOUNTADMIN can create a monitor, but other roles can be granted rights to view and modify monitors.
Exam trap A warehouse cannot sit under two warehouse monitors for extra protection; it belongs to only one resource monitor at a time.
Step 4 of 11
Suspend lets running queries finish; Suspend Immediate cancels them. A monitor holds one Suspend action, one Suspend Immediate action and up to five Notify actions. Choose Suspend Immediate only when cancelling running statements is acceptable.
The two suspend actions compared
| Feature | Suspend | Suspend Immediate |
|---|---|---|
| Allowed per monitor | 1 | 1 |
| Running queries | Allowed to complete | Cancelled at once |
| Warehouses affected | All assigned warehouses | All assigned standard warehouses |
Exam trap Reaching the Suspend threshold does not kill queries already running; only Suspend Immediate cancels them.
Step 5 of 11
The quota counts warehouse credits plus the cloud services behind them. By default, monitoring starts at once and used credits go back to 0 each calendar month. Whatever start time you set, the reset happens at 12:00 AM UTC.
Exam trap A monitor set to start at 9:00 AM local time still resets at 12:00 AM UTC, not at its own start time.
Step 6 of 11
Resource monitors track warehouses only; use a budget for serverless spend. Snowpipe, automatic reclustering and materialized views fall outside even an account monitor. A budget can track these features and AI services. On warehouses, a budget follows two service types: WAREHOUSE_METERING and QUERY_ACCELERATION.
Exam trap An account-level monitor watches every warehouse, yet it does not cap Snowpipe or reclustering credits.
Step 7 of 11
A shared warehouse counts toward a budget only when selected users run queries. Idle time, very short queries, cloud services overhead and automated work such as tasks are not attributed to users. When a warehouse is both direct and shared, the direct measurement wins. Standard budgets can lag up to 11 hours here, and low-latency budgets up to 6.
Step 8 of 11
CREDITS_USED adds compute and cloud services credits, before any adjustment. It can therefore exceed the billed amount, which METERING_DAILY_HISTORY shows. CREDITS_ATTRIBUTED_COMPUTE_QUERIES leaves out idle time, so subtract it from CREDITS_USED_COMPUTE to estimate idle cost. After a resume, metering starts once all compute resources are provisioned.
Exam trap
CREDITS_USEDis not the billed figure, because it ignores the cloud services adjustment. UseMETERING_DAILY_HISTORYfor billed credits.
Step 9 of 11
Query load is query execution time divided by the interval's length. Low load with slow queries points to a larger warehouse size. High load or queuing points to a separate warehouse or more clusters. A warehouse running with load below 1 for long periods is wasting credits. Viewing the load chart needs the MONITOR privilege.
Step 10 of 11
ACCOUNT_USAGE keeps 1 year of history but lags behind. Information Schema has no lag but keeps far less history. WAREHOUSE_METERING_HISTORY returns hourly credits for the last 365 days. WAREHOUSE_LOAD_HISTORY reports load in 5-minute intervals.
ACCOUNT_USAGE and Information Schema compared
| Feature | ACCOUNT_USAGE | Information Schema |
|---|---|---|
| Latency | Between 45 minutes and 3 hours, per view | None |
| History kept | 1 year | Between 7 days and 6 months, per view |
Exam trap Information Schema cannot answer a question about last year's spending; it keeps at most 6 months of history.
Step 11 of 11
METERING_DAILY_HISTORY, since CREDITS_USED ignores the cloud services adjustment.Sources: Working with resource monitors | Snowflake Documentation · Account Usage | Snowflake Documentation · RESOURCE_MONITORS view | Snowflake Documentation · Using budgets for warehouses (shared resources) | Snowflake Documentation · Monitoring warehouse load | Snowflake Documentation · Account Overview | Snowflake Documentation · WAREHOUSE_METERING_HISTORY view | Snowflake Documentation · WAREHOUSE_EVENTS_HISTORY view | Snowflake Documentation
Check
Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.
Mixed quiz
20 questions mixed from every topic in this domain, each answer explained. Mixing topics is harder than one at a time, and it is what the exam does. No account needed; with a free account your answers also build your estimated exam score.
Flashcards
6 cards with this domain's key facts. Flip each one and check what you knew. No account needed.
Thank you. It goes straight to the people who write these notes.
Free to start: the study path, quizzes, flashcards and the first mock exam, no card needed. A free account keeps your place and saves your quiz scores.