Bird
Raised Fist0
Snowflakecloud~10 mins

System-defined roles (ACCOUNTADMIN, SYSADMIN, etc.) in Snowflake - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to switch to the SYSADMIN role.

Snowflake
USE ROLE [1];
Drag options to blanks, or click blank then click option'
ASYSADMIN
BSECURITYADMIN
CPUBLIC
DACCOUNTADMIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using ACCOUNTADMIN instead of SYSADMIN.
Typing role names in lowercase.
2fill in blank
medium

Complete the code to grant the SECURITYADMIN role to a user.

Snowflake
GRANT ROLE [1] TO USER alice;
Drag options to blanks, or click blank then click option'
ASYSADMIN
BSECURITYADMIN
CACCOUNTADMIN
DPUBLIC
Attempts:
3 left
💡 Hint
Common Mistakes
Granting SYSADMIN instead of SECURITYADMIN.
Forgetting to specify the user.
3fill in blank
hard

Fix the error in the command to switch to the ACCOUNTADMIN role.

Snowflake
USE ROLE [1];
Drag options to blanks, or click blank then click option'
AACCOUNTADMIN
Baccountadmin
CAccountAdmin
DADMIN
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or mixed case role names.
Using a non-existent role like ADMIN.
4fill in blank
hard

Fill both blanks to create a role hierarchy where SYSADMIN is granted to ACCOUNTADMIN.

Snowflake
GRANT ROLE [1] TO ROLE [2];
Drag options to blanks, or click blank then click option'
ASYSADMIN
BPUBLIC
CACCOUNTADMIN
DSECURITYADMIN
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing the roles in the grant statement.
Using PUBLIC or SECURITYADMIN incorrectly.
5fill in blank
hard

Fill both blanks to revoke the SECURITYADMIN role from user bob.

Snowflake
REVOKE ROLE [1] FROM USER [2];
Drag options to blanks, or click blank then click option'
ASYSADMIN
Bbob
CSECURITYADMIN
Dalice
Attempts:
3 left
💡 Hint
Common Mistakes
Revoking the wrong role.
Using the wrong user name.

Practice

(1/5)
1. Which Snowflake system-defined role has full control over the entire account, including all objects and users?
easy
A. ACCOUNTADMIN
B. SYSADMIN
C. SECURITYADMIN
D. PUBLIC

Solution

  1. Step 1: Understand role privileges

    ACCOUNTADMIN is designed to have full control over the Snowflake account, including all objects and user management.
  2. Step 2: Compare with other roles

    SYSADMIN manages data objects, SECURITYADMIN manages users and roles, and PUBLIC has minimal default privileges.
  3. Final Answer:

    ACCOUNTADMIN -> Option A
  4. Quick Check:

    Full account control = ACCOUNTADMIN [OK]
Hint: Full control role is ACCOUNTADMIN, others have limited scopes [OK]
Common Mistakes:
  • Confusing SYSADMIN with full control
  • Thinking SECURITYADMIN manages data objects
  • Assuming PUBLIC has admin privileges
2. Which of the following is the correct syntax to switch to the SYSADMIN role in Snowflake?
easy
A. SET ROLE SYSADMIN;
B. CHANGE ROLE TO SYSADMIN;
C. USE ROLE SYSADMIN;
D. SWITCH TO SYSADMIN;

Solution

  1. Step 1: Recall Snowflake role switching syntax

    The correct command to switch roles is USE ROLE <role_name>;.
  2. Step 2: Verify options

    Only USE ROLE SYSADMIN; matches the correct syntax exactly.
  3. Final Answer:

    USE ROLE SYSADMIN; -> Option C
  4. Quick Check:

    Switch role command = USE ROLE [OK]
Hint: Switch roles with USE ROLE followed by role name [OK]
Common Mistakes:
  • Using SET ROLE instead of USE ROLE
  • Adding extra words like TO or SWITCH
  • Missing semicolon at the end
3. Given the following commands executed in order:
USE ROLE SECURITYADMIN;
CREATE USER test_user PASSWORD='Pass1234';
USE ROLE SYSADMIN;
CREATE TABLE test_table(id INT);
Which statement is true about the created objects?
medium
A. test_user is created successfully; test_table creation fails due to insufficient privileges.
B. Both test_user and test_table creation fail.
C. test_user creation fails; test_table is created successfully.
D. Both test_user and test_table are created successfully.

Solution

  1. Step 1: Analyze role privileges for user creation

    SECURITYADMIN can create users, so CREATE USER test_user succeeds.
  2. Step 2: Analyze role privileges for table creation

    SYSADMIN manages data objects, so CREATE TABLE test_table succeeds.
  3. Final Answer:

    Both test_user and test_table are created successfully. -> Option D
  4. Quick Check:

    SECURITYADMIN creates users, SYSADMIN creates tables [OK]
Hint: SECURITYADMIN for users, SYSADMIN for tables; both succeed [OK]
Common Mistakes:
  • Assuming SYSADMIN can create users
  • Assuming SECURITYADMIN can create tables
  • Confusing role privileges
4. You run the command CREATE USER new_user PASSWORD='abc123'; while using the SYSADMIN role and get an error. What is the most likely cause?
medium
A. Password does not meet complexity requirements.
B. SYSADMIN role does not have privileges to create users.
C. The command syntax is incorrect.
D. The user already exists.

Solution

  1. Step 1: Check role privileges for user creation

    Only SECURITYADMIN or ACCOUNTADMIN can create users; SYSADMIN lacks this privilege.
  2. Step 2: Consider other options

    Password complexity or syntax errors would cause different error messages; user existence would be a different error.
  3. Final Answer:

    SYSADMIN role does not have privileges to create users. -> Option B
  4. Quick Check:

    User creation requires SECURITYADMIN or ACCOUNTADMIN [OK]
Hint: User creation needs SECURITYADMIN, not SYSADMIN [OK]
Common Mistakes:
  • Blaming password complexity without checking error
  • Assuming SYSADMIN can create users
  • Ignoring role privilege boundaries
5. You want to delegate user and role management to one admin and data object management to another, while keeping full control yourself. Which role assignments follow best practices?
hard
A. Assign SECURITYADMIN to user1, SYSADMIN to user2, ACCOUNTADMIN to yourself.
B. Assign ACCOUNTADMIN to user1, SECURITYADMIN to user2, SYSADMIN to yourself.
C. Assign SYSADMIN to user1, ACCOUNTADMIN to user2, SECURITYADMIN to yourself.
D. Assign PUBLIC to user1, SYSADMIN to user2, SECURITYADMIN to yourself.

Solution

  1. Step 1: Understand role responsibilities

    SECURITYADMIN manages users and roles; SYSADMIN manages data objects; ACCOUNTADMIN has full control.
  2. Step 2: Match roles to admin tasks

    Assign SECURITYADMIN to the admin handling users, SYSADMIN to the admin handling data, and keep ACCOUNTADMIN yourself for full control.
  3. Final Answer:

    Assign SECURITYADMIN to user1, SYSADMIN to user2, ACCOUNTADMIN to yourself. -> Option A
  4. Quick Check:

    Delegate roles by responsibility, keep ACCOUNTADMIN for full control [OK]
Hint: Delegate SECURITYADMIN for users, SYSADMIN for data, keep ACCOUNTADMIN [OK]
Common Mistakes:
  • Giving ACCOUNTADMIN to others unnecessarily
  • Assigning PUBLIC role for admin tasks
  • Mixing up role responsibilities
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard