Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Configure database auditing for Azure SQL Database and Azure SQL Managed Instance

A worked example

Single answer

You configured server-level auditing for an Azure SQL Database logical server, with Azure Blob Storage as the destination. When auditing was enabled in March, the retention was left at 0 days. In September, an administrator changes the retention to 90 days. No immutability policy is configured on the audit container.

What happens to the audit logs that were written between March and September?

Choose one answer
Why

A 0-day retention means unlimited retention, so audit logs are never deleted automatically. When retention is later changed, the new value governs only logs written after the change. The logs from March to September were written under unlimited retention, so they remain in storage. This protects historical audit data from being deleted by accident when the policy changes.

  • Not correct: They are deleted as soon as the new setting is saved. These logs were written while retention was 0 (unlimited). The new 90-day value applies only to logs written after the change, so it does not purge them.
  • Not correct: They are kept for 90 days after the change and then deleted. Logs written during the unlimited period stay preserved. The new retention does not start a deletion countdown for them.
  • Not correct: Each one is deleted when it becomes 90 days old. The 90-day value is not applied retroactively. Logs written under unlimited retention are not automatically deleted.
  • Not correct: The change is rejected until those logs are removed manually. Retention can be set to any number of days, and the change takes effect for logs written afterwards. Existing logs do not block the change.
  • Correct: They are kept and are not deleted automatically. Retention applies only to logs written after the value is set. Logs written during the unlimited (0 days) period are preserved.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free