Challenge - 5 Problems
Access History & Audit Logging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Querying Access History for a User
What is the output of this query that retrieves access history for user 'JOHN_DOE' in the last 7 days?
Snowflake
SELECT event_time, user_name, object_name, action FROM SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY WHERE user_name = 'JOHN_DOE' AND event_time >= DATEADD(day, -7, CURRENT_TIMESTAMP());
Attempts:
2 left
💡 Hint
Check the table name and filter conditions carefully.
✗ Incorrect
The query correctly filters access history for user 'JOHN_DOE' in the last 7 days, returning matching events.
🧠 Conceptual
intermediate1:30remaining
Purpose of Access History in Snowflake
What is the primary purpose of the ACCESS_HISTORY view in Snowflake?
Attempts:
2 left
💡 Hint
Think about what audit logging means in a database context.
✗ Incorrect
ACCESS_HISTORY records user actions on database objects, helping with auditing and compliance.
❓ Troubleshoot
advanced2:30remaining
Troubleshooting Missing Audit Logs
You notice that recent user activities are not appearing in the ACCESS_HISTORY view. What could be a likely cause?
Attempts:
2 left
💡 Hint
Consider how Snowflake replicates usage data to ACCOUNT_USAGE.
✗ Incorrect
ACCOUNT_USAGE views can have a delay of up to 45 minutes or more before recent data appears.
🔀 Workflow
advanced3:00remaining
Setting Up Audit Logging for Compliance
Which sequence of steps correctly sets up audit logging access for a security team in Snowflake?
Attempts:
2 left
💡 Hint
Think about granting access before verification.
✗ Incorrect
First create the role with privileges, then grant it, verify access, and finally monitor logs.
✅ Best Practice
expert3:00remaining
Best Practice for Retaining Audit Logs
What is the recommended best practice for retaining audit logs in Snowflake for long-term compliance?
Attempts:
2 left
💡 Hint
Think about compliance requirements for long-term data retention.
✗ Incorrect
Snowflake's default retention may not meet all compliance needs; exporting logs externally is best practice.