CertSafari
    Snowflake SnowPro Advanced: Administrator (ADA-C02)· Lessons

    Domain 1 · Lesson 3/24

    Snowflake privileges by object type, SHOW grants and login auditing

    Given a scenario, create and manage access control.

    18 min read
    4.43% of exam
    10 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Pick the narrowest privilege that lets a role do a given task on a database, schema, table, stage, function or warehouse
    • Tell object privileges apart from global (account) privileges such as MANAGE GRANTS, CREATE ROLE and CANCEL QUERY
    • Use SHOW ROLES, SHOW USERS and the SHOW GRANTS variants to find out who holds what, and predict what each one shows to a role without admin rights
    • Audit sign-ins, sessions and queries with the ACCOUNT_USAGE views, and pick the SNOWFLAKE database role an auditor needs

    Key concept

    Privilege on an object, held by a role — In Snowflake, a privilege is always granted on one specific object (or on the account) to a role, and users get it by being granted that role. The same privilege name can allow different things on different object types. To work out what a user can do, you look at the role, then the object, then the privilege.

    1.How a privilege attaches to a role and an object

    Every grant in Snowflake has three parts: a privilege, the object it applies to, and the role that receives it. Users never hold object privileges directly in the normal model. They get them through the roles granted to them. That is why access reviews, covered later on this page, always come back to roles.

    A privilege name is not a fixed capability. MONITOR on a warehouse shows its queries and usage. MONITOR on a user, task or database shows details of that object instead. USAGE on a schema lets a role use the schema and list what is in it, while USAGE on a function lets a role call it. Not every object type accepts every privilege, so a grant that reads well in English can be invalid for the object you named. To get the definitive list of privileges an object accepts, call EXPLAIN_GRANTABLE_PRIVILEGES rather than guessing.

    OWNERSHIP is the exception to the grant-it-yourself pattern. Snowflake gives it automatically to the role that created the object. It covers dropping, altering, renaming and granting or revoking access on the object. The owning role can hand it to another role with GRANT OWNERSHIP, and so can any role with MANAGE GRANTS. If a role can drop a table that nobody explicitly granted it rights on, look first at who created the table.

    Checkpoint 1 of 9· Check yourself

    The role ETL_ROLE can drop and rename the table SALES.RAW.ORDERS, but no administrator ever ran a GRANT that gave ETL_ROLE any privilege on that table. What is the most likely explanation?

    Sources1

    2.Which privileges each object type accepts

    Containers, data objects and executable objects each take a different set of privileges. Databases and schemas take USAGE to enter them, CREATE <object_type> to add objects inside them, and MODIFY and MONITOR for their settings and details. Tables take the DML verbs. Stages split by kind: internal stages use READ and WRITE, and external stages use USAGE. A role that loads from an internal stage with COPY INTO <table> needs READ on that stage. USAGE on an internal stage is not a privilege that applies.

    Common privileges by object type
    Object typePrivilegesWhat they allow
    Database, SchemaUSAGE, CREATE <object_type>, MODIFY, MONITORUSE and SHOW on the container; create objects inside it; change its settings; see its details
    TableSELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCESRun the matching statement; REFERENCES shows the structure but not the data
    View, Materialized ViewSELECT, REFERENCESQuery it; see its structure
    Stage (internal only)READ, WRITEREAD for GET, LIST and COPY INTO <table>; WRITE for PUT, REMOVE and COPY INTO <location>
    Stage (external only), File Format, SequenceUSAGEUse the object in statements
    User-Defined Function, Stored Procedure, External FunctionUSAGEExecute the routine
    TaskMONITOR, OPERATESee details; suspend or resume it

    REFERENCES is easy to misread. It lets a role see a table's structure, but not its data. It also lets the role point a foreign key at the table as the unique or primary key side. A role with REFERENCES and no SELECT can describe the columns of a table but cannot read a single row.

    Warehouses show most clearly how close privileges can sit while doing different jobs. OPERATE controls the warehouse's state: start, stop, suspend and resume. It also lets the role view current and past queries and abort any query that is running. MODIFY covers every property, including size. That is the one to withhold when a role must not resize the warehouse or change its auto-suspend setting. MONITOR only lets the role look at queries and usage statistics, and USAGE only lets it run queries on the warehouse.

    Warehouse privileges compared
    PrivilegeChange state (suspend/resume)Abort running queriesChange size or propertiesView queries and usage
    USAGENoNoNoNo
    MONITORNoNoNoYes
    OPERATEYesYesNoYes
    MODIFYNoNoYesNo

    Checkpoint 2 of 9· Check yourself

    A data engineer grants USAGE on the internal stage @RAW_FILES to LOADER_ROLE. LOADER_ROLE then runs COPY INTO a table from that stage. Which grant on the stage does LOADER_ROLE need for the load to work?

    Checkpoint 3 of 9· Exam question

    A role named LOAD_OPS runs nightly batch jobs and must be able to suspend and resume the warehouse ETL_WH around each run and abort stuck queries on it. It must not be able to resize the warehouse or change its auto-suspend setting. Which grant is the MOST appropriate?

    Sources12

    3.Global privileges are granted on the account

    Some privileges do not belong to any single object. They are granted ON ACCOUNT and apply to the whole account. CREATE ROLE, CREATE USER, CREATE DATABASE and CREATE WAREHOUSE live here, as do the APPLY ... POLICY family and the monitoring privileges. Several of them, including CREATE DATABASE, CREATE WAREHOUSE and MONITOR USAGE, must be granted by ACCOUNTADMIN. Delegating those is an ACCOUNTADMIN decision, not a SECURITYADMIN one.

    MANAGE GRANTS is the global privilege behind delegated administration. It lets a role grant or revoke privileges on objects it does not own, acting as if it were the owner. SECURITYADMIN holds it account-wide by default. A custom role that needs the same reach needs MANAGE GRANTS granted to it. OWNERSHIP of many objects is not a substitute. MANAGE GRANTS can also be granted on a single database or schema, which limits that power to the container and the objects in it.

    Several global privileges are close to an object privilege but reach further. CANCEL QUERY cancels queries run by any user in the account, while OPERATE on a warehouse only aborts queries on that warehouse. MONITOR USAGE shows usage and history for databases and warehouses across the account. MONITOR USER and MONITOR ROLE let a role view users or roles across the account without being able to change them. When a task concerns one object, grant the object privilege. Reach for the global privilege only when the task really is account-wide.

    Checkpoint 4 of 9· Check yourself

    An on-call support role has to cancel runaway queries from any user, on any warehouse in the account. It must not be able to suspend, resume or resize warehouses. Which grant fits?

    Sources1

    4.Listing roles and users with SHOW ROLES and SHOW USERS

    SHOW ROLES lists system-defined and custom roles, but only the ones your current role can see. It returns roles on which your current role holds at least one privilege. MANAGE GRANTS lets its holder see every object, so by default only ACCOUNTADMIN and SECURITYADMIN get the full list. Seeing a role's name gives no access: being able to list a role is not the same as being able to use it.

    Each row describes one role: its owner, whether it is your default or current role, and three counts. assigned_to_users counts users, granted_to_roles counts roles that hold it, and granted_roles counts roles it holds. These are numbers, not names. A row showing ANALYST with granted_to_roles of 6 tells you six roles hold it, not which six. LIKE, STARTS WITH and LIMIT ... FROM narrow or page through the output, and the command needs no running warehouse.

    Page through account roles, starting after a given namesql
    SHOW ROLES LIMIT 10 FROM 'my_role2';

    SHOW USERS filters by column instead of by row. Every user's name always appears. The rest of the columns are filled in only if the active role has OWNERSHIP of that user or MANAGE GRANTS on the account, and otherwise they are NULL. Those columns are what an access reviewer needs: disabled, type, has_password, has_rsa_public_key, has_mfa, has_pat, default_role and last_success_login. Note that default_role is the only role it reports. SHOW USERS does not list the roles granted to a user.

    Checkpoint 5 of 9· Check yourself

    During an access review, an auditor works in the custom role AUDIT_ROLE. SHOW ROLES returns only a few of the account's roles. SHOW USERS lists every username, but columns such as has_mfa and disabled are NULL. Which single grant to AUDIT_ROLE fixes both outputs?

    Sources3

    5.Inspecting grants with SHOW GRANTS ON, TO and OF

    SHOW GRANTS lists privileges that have been explicitly granted to roles, users and shares. The keyword after GRANTS decides which way you are looking. Run without a keyword, it is the same as SHOW GRANTS TO USER current_user and lists the roles you hold.

    SHOW GRANTS variants and the question each answers
    CommandAnswers
    SHOW GRANTS ON ACCOUNTWhich roles hold global (account-level) privileges?
    SHOW GRANTS ON <object_type> <object_name>Who holds which privileges on this object?
    SHOW GRANTS TO ROLE <role_name>What has this role been granted: privileges and the roles it holds?
    SHOW GRANTS TO USER <user_name>What has been granted to this user?
    SHOW GRANTS OF ROLE <role_name>Which users and roles has this role been granted to?
    SHOW FUTURE GRANTS IN SCHEMA <schema_name>Which grants will apply to objects created in this schema later?

    TO and OF point in opposite directions, and mixing them up gives you the wrong answer. SHOW GRANTS TO ROLE finance_analyst looks into the role: the database USAGE, table SELECT and other privileges it holds. SHOW GRANTS OF ROLE finance_analyst looks out from the role and lists every user and every role it has been granted to. After a reorganization, OF is the command to use when you need to find which accounts and parent roles still carry a role. Each row's granted_to column says USER or ROLE, and grantee_name names the holder.

    List every role and user that holds the ANALYST rolesql
    SHOW GRANTS OF ROLE analyst;

    Checkpoint 6 of 9· Match them up

    Match each SHOW GRANTS variant to the access-review question it answers.

    Tap a term, then the definition that fits it.

    Checkpoint 7 of 9· Exam question

    After a reorganization, a security reviewer must list every user and every role that has been granted the custom role FINANCE_ANALYST, so access can be removed from the right accounts. Which command returns this information?

    Sources4

    6.Auditing logins, sessions and queries in ACCOUNT_USAGE

    SHOW commands describe current state. Questions about history, such as who signed in, how, and what they ran, are answered from the views in SNOWFLAKE.ACCOUNT_USAGE. These views trade freshness for depth. They keep dropped objects and a year of history, but their data arrives with a delay.

    ACCOUNT_USAGE views against their Information Schema counterparts
    PropertyACCOUNT_USAGEINFORMATION_SCHEMA
    Includes dropped objectsYesNo
    Latency45 minutes to 3 hours, by viewNone
    History retained1 year7 days to 6 months, by view or function
    Login historyLOGIN_HISTORY view: 2 hours latency, 1 yearLOGIN_HISTORY table function: last 7 days only

    Pick the source based on how far back the question goes. The INFORMATION_SCHEMA.LOGIN_HISTORY table function returns login activity from the last 7 days only. If you ask it for a time range outside that window, it returns an error. A four-month investigation into password guessing therefore needs ACCOUNT_USAGE.LOGIN_HISTORY. Each row there is one login attempt, with USER_NAME, CLIENT_IP, REPORTED_CLIENT_TYPE, FIRST_AUTHENTICATION_FACTOR, SECOND_AUTHENTICATION_FACTOR, IS_SUCCESS, and an ERROR_CODE and ERROR_MESSAGE when the attempt failed. Filter on is_success = 'NO' and group by user and IP. Treat REPORTED_CLIENT_TYPE with care, because the client reports it and Snowflake does not authenticate it.

    Failed logins and failure rate per user, month to datesql
    select user_name, sum(iff(is_success = 'NO', 1, 0)) as failed_logins, count(*) as logins, sum(iff(is_success = 'NO', 1, 0)) / nullif(count(*), 0) as login_failure_rate from login_history where event_timestamp > date_trunc(month, current_date) group by 1 order by 4 desc;

    SESSIONS and USERS answer different questions, so they cannot replace LOGIN_HISTORY. SESSIONS returns one row for each session created in the last year, with AUTHENTICATION_METHOD, LOGIN_EVENT_ID and client details. It tells you how successful connections were made, and it records a session only when one was created. USERS is an object view that describes each user, not each attempt. QUERY_HISTORY records what was run, with 45 minutes of latency and one year of retention. Because these views can change over time, select the columns you need rather than SELECT *.

    An auditor's role needs read access to these views, and the narrow way to give it is through SNOWFLAKE database roles. A database role is a named set of privileges that lives inside a database rather than at account level. The SNOWFLAKE database defines four for ACCOUNT_USAGE (OBJECT_VIEWER, USAGE_VIEWER, GOVERNANCE_VIEWER and SECURITY_VIEWER), each holding SELECT on a specific group of views. A database role reaches an auditor when ACCOUNTADMIN runs GRANT DATABASE ROLE, which assigns a database role to an account role. The auditor's custom role then carries the view access, and any user granted that account role can query the views. Granting IMPORTED PRIVILEGES on the whole SNOWFLAKE database is broader, which is why database roles are the safer choice. The detail people get wrong is that the views are split across roles. LOGIN_HISTORY, SESSIONS, USERS, ROLES and the GRANTS_TO_* views need SECURITY_VIEWER. QUERY_HISTORY needs GOVERNANCE_VIEWER. An auditor who must cover both sign-ins and queries needs both database roles. The wider setup for giving non-admins this access is in Giving non-admins access to usage and billing data.

    For an organization with several accounts, the ORGANIZATION_USAGE schema has its own LOGIN_HISTORY view. It carries the same event columns, including CLIENT_IP, IS_SUCCESS and the authentication factors, so one query can cover every account. How that schema is enabled and governed is covered under ORGANIZATION_USAGE.

    Checkpoint 8 of 9· Fill the gap

    This ACCOUNT_USAGE query reports failed logins and the failure rate per user for the current month. Which view belongs in the blank?

    select user_name, sum(iff(is_success = 'NO', 1, 0)) as failed_logins, count(*) as logins, sum(iff(is_success = 'NO', 1, 0)) / nullif(count(*), 0) as login_failure_rate from  ?  where event_timestamp > date_trunc(month, current_date) group by 1 order by 4 desc;

    Checkpoint 9 of 9· Exam question

    The security team suspects password-guessing attacks over the last four months. An administrator must report failed sign-in attempts per user and client IP address for that whole period. Which source is the MOST appropriate?

    Sources5678

    Sources

    (10)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “The meaning of each privilege varies depending on the object type to which it is applied, and not all objects support all privileges”
      ↩︎ How a privilege attaches to a role and an object
      “To obtain a definitive list of all possible privileges for one or more objects, call the EXPLAIN_GRANTABLE_PRIVILEGES function.”
      ↩︎ How a privilege attaches to a role and an object
      “OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object”
      ↩︎ How a privilege attaches to a role and an object
      “Grants the ability to perform any operations that require reading from an internal stage (GET, LIST, COPY INTO <table>, etc.).”
      ↩︎ Which privileges each object type accepts
      “Grants the ability to view the structure of an object (but not the data).”
      ↩︎ Which privileges each object type accepts
      “Enables granting or revoking privileges on objects for which the role is not the owner.”
      ↩︎ Global privileges are granted on the account
      “The SECURITYADMIN role holds account-level MANAGE GRANTS by default.”
      ↩︎ Global privileges are granted on the account
      “Grants the ability to cancel queries executed by any user in the account.”
      ↩︎ Global privileges are granted on the account
      “Privileges are granted to roles, and roles are granted to users”
      ↩︎ Key concept
      “Grants the ability to perform any operations that require reading from an internal stage (GET, LIST, COPY INTO <table>, etc.)”
      ↩︎ Checkpoint
    2. 2.
      “Enables altering any properties of a warehouse, including changing its size.”
      ↩︎ Which privileges each object type accepts
      “Enables viewing current and past queries executed on a warehouse as well as usage statistics on that warehouse.”
      ↩︎ Which privileges each object type accepts
      “and aborting any executing queries.”
      ↩︎ Exam trap 1
      “Enables changing the state of a warehouse (stop, start, suspend, resume)”
      ↩︎ Prediction
    3. 3.
      “The command only returns objects for which the current user’s current role has been granted at least one access privilege.”
      ↩︎ Listing roles and users with SHOW ROLES and SHOW USERS
      “The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account.”
      ↩︎ Listing roles and users with SHOW ROLES and SHOW USERS
      “the ability to list roles is not the same as using any role.”
      ↩︎ Listing roles and users with SHOW ROLES and SHOW USERS
      “You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase.”
      ↩︎ Listing roles and users with SHOW ROLES and SHOW USERS
    4. 4.
      “Lists all access control privileges that have been explicitly granted to roles, users, and shares.”
      ↩︎ Inspecting grants with SHOW GRANTS ON, TO and OF
      “Lists all the account-level (i.e. global) privileges that have been granted to roles.”
      ↩︎ Inspecting grants with SHOW GRANTS ON, TO and OF
      “List all roles and users who have been granted the analyst role:”
      ↩︎ Exam trap 2
      “Lists all privileges that have been granted on the object.”
      ↩︎ Checkpoint
    5. 5.
      “Certain account usage views provide historical usage metrics. The retention period for these views is 1 year (365 days).”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
      “To avoid unintentionally granting access to organization-level data, consider using SNOWFLAKE database roles to grant access to views in the ACCOUNT_USAGE schema.”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
      “Grant a SNOWFLAKE database role to an account role.”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
      “ACCOUNT_USAGE schemas have four defined SNOWFLAKE database roles, each granted the SELECT privilege on specific views.”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
      “LOGIN_HISTORY view | SECURITY_VIEWER”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
      “The Snowflake-specific views are subject to change. Avoid selecting all columns from these views.”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
      “QUERY_HISTORY view | GOVERNANCE_VIEWER”
      ↩︎ Exam trap 4
    6. 6.
      “GRANT DATABASE ROLE | Assigns a database role to an account role, another database role, or a user.”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
      “SHOW DATABASE ROLES | Lists all the database roles in the specified database.”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE
    7. 7.
      “Snowflake returns one row for each session created over the last year.”
      ↩︎ Auditing logins, sessions and queries in ACCOUNT_USAGE

    Also cited

    Ready to test yourself?

    Practise the 16 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.