An aisle between rows of server racks in a data center
SQL Server Audit

How to enable SQL Server Audit and review the log. The weekly review is the control that matters.

Setting up the server audit, the specifications and failure behavior, running a weekly review of the log, and keeping a year of history as licensing evidence.

Contact Us Microsoft Advisory
500+Enterprise clients
$2B+Under advisory
PublishedJuly 24, 2025UpdatedSeptember 24, 2026
ContentsKey takeawaysWhat SQL Server Audit capturesEnabling a server auditThe weekly reviewSizing a year of audit filesWhat we saw in 2024 and 2025Using the log in licensing reviewsWhat to do nextFAQ

Configuring SQL Server Audit takes about an hour. The value comes from a weekly review of the log and from keeping a year of history, which also answers Microsoft's licensing questions.

Key takeaways
  • Every edition supports it. Since SQL Server 2016 Service Pack 1, database audit specifications work in Standard edition too, not only Enterprise.
  • Few teams read the output. Fewer than 1 in 4 of the organizations we reviewed with audits enabled had a scheduled review of the log.
  • Choose the target and failure action deliberately. A protected file target, a chosen ON_FAILURE setting and AUDIT_CHANGE_GROUP make tampering visible.
  • Scope the data access auditing. Audit named sensitive tables and schemas, because broad data access auditing slows busy OLTP databases.
  • Review weekly for three signals. Privilege drift, schema drift and tampering signals are what the weekly pass is looking for.
  • Keep 12 months of history. A year of archived audit files, summarized quarterly, is evidence you can hand to Microsoft at a true up or audit.

What does SQL Server Audit actually capture?

SQL Server Audit records the server and database events you select and writes them to a binary audit file, the Windows Security log or the Windows Application log. It is built into the Database Engine, so there is nothing extra to install or license.

What lands in the log is decided by action groups. The ones that matter for most organizations cover logins, permission changes, schema modification, data access, and backup and restore events. The official feature documentation describes the full model.

The three objects, in the order you create them

  1. Server audit. The destination: where events are written, how files roll over, and what SQL Server does if it cannot write. It is created disabled and records nothing until you switch it on.
  2. Server audit specification. Instance level action groups such as failed logins and server role changes. Each server audit can have one server audit specification.
  3. Database audit specification. Action groups for one database, which can be narrowed to specific schemas, objects and principals. Each database can have one per server audit.

Which editions support it?

Server level auditing works in every edition. Database audit specifications were limited to Enterprise, Developer and Evaluation until SQL Server 2016 Service Pack 1, and since then the full feature runs in every edition. A Standard edition shop has no technical reason left to go without it.

What it costs at runtime

In our testing, file targeted audits with sensible action groups add overhead in the low single digit percent range. The cost shows up when teams audit broad data access on busy OLTP databases, where every SELECT against a hot table becomes an audit record.

Two settings help. QUEUE_DELAY defaults to 1,000 milliseconds, which allows SQL Server to batch writes; setting it to 0 forces synchronous delivery and adds latency to every audited statement. A WHERE predicate on the server audit filters events before they are written, for example to drop a monitoring login that connects every few seconds.

How do you enable a server audit correctly?

Create the server audit with a file target and a chosen failure behavior, then bind one server audit specification and a database audit specification for each database that holds regulated data. Enable the audit and each specification last. Microsoft's step by step creation guide covers both the Management Studio path and the Transact SQL path.

Minimum configuration for a regulated SQL Server instance
LayerSettingWhy
TargetBinary file on a dedicated volumeFast, tamper evident, survives a cleared Windows event log
Failure actionFAIL_OPERATION for regulated databasesAudited events cannot vanish without a trace
Server specificationLogins, role changes, audit changesCatches privilege escalation and tampering
Database specificationSchema changes, permission grants, access to sensitive objectsThe events regulators ask about
RetentionRollover files, 12 months minimumCovers both a security investigation and the true up window
ReviewWeekly scripted pass plus alertingA log that no one reads is a liability, and it does not count as a control

Which action groups belong in each specification?

  • Server specification. FAILED_LOGIN_GROUP, SUCCESSFUL_LOGIN_GROUP, SERVER_ROLE_MEMBER_CHANGE_GROUP, SERVER_PERMISSION_CHANGE_GROUP, AUDIT_CHANGE_GROUP and BACKUP_RESTORE_GROUP.
  • Database specification. DATABASE_ROLE_MEMBER_CHANGE_GROUP, DATABASE_PERMISSION_CHANGE_GROUP, SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP and SCHEMA_OBJECT_CHANGE_GROUP.
  • Sensitive tables only. SELECT, INSERT, UPDATE and DELETE actions on the named tables or schemas that hold card, health or payroll data, scoped to the public role so every user is covered.

Microsoft flags DATABASE_OBJECT_CHANGE_GROUP and DATABASE_OBJECT_ACCESS_GROUP as groups that can produce large volumes of records. Add them only with a clear reason and a volume test.

The settings that cause trouble later

  • ON_FAILURE. CONTINUE is the default and leaves gaps when the target fills or goes offline. FAIL_OPERATION blocks the audited actions until writing resumes, and SHUTDOWN stops the instance. Pick per database according to how much downtime you can accept, and write the decision down.
  • Audit the audit. Turning an audit on or off is always recorded. Creating, changing or dropping a specification is recorded only if AUDIT_CHANGE_GROUP is in the specification, so include it.
  • File security. Give the audit folder its own permissions. A DBA or server administrator who can delete the files defeats the control.
  • Security log target. Writing to the Windows Security log needs the service account in the Generate security audits policy and Audit object access enabled for success and failure. Most teams find the file target easier to protect and to read.

Reading the log without drowning in it

The binary files are read with sys.fn_get_audit_file, and the fields it returns are listed in the audit records reference. Event times come back in UTC. From SQL Server 2017 the output also carries client_ip and application_name, which make the licensing work below much easier.

Wrap the function in a SQL Server Agent job that filters for the dozen or so event types you care about and writes exceptions to a review table. Alert immediately on the rare ones: audit state changes, new sysadmin members and permission grants on sensitive schemas.

Keep the reviewer separate from the people audited

The weekly review checks what DBAs and administrators did, so one of them should not sign it off. Have the Agent job load records into a review table in a separate database and grant the reviewer SELECT on that table. The reviewer then needs no server level permission on any SQL Server version.

Free white paper

SQL Server Licensing Guide

Audit baseline, review script outline, retention template and true up evidence checklist in one download.

Get the white paper →

What should the weekly SQL Server audit review look for?

The weekly pass looks for three things: privilege drift, schema drift and signs of tampering. Everything else is noise until an incident turns it into evidence, which is why retention matters more than a real time dashboard.

  • Privilege drift. New server role members, permission grants made outside change windows, and high privilege accounts whose owner has left.
  • Schema drift. Object changes on production databases that no change record explains.
  • Tampering signals. Specification changes, audit stops, and gaps in the file sequence or in event_time.

How the review cadence builds up over a year

Audit review cadence and what each pass produces
CadenceWhat to doOutput
ContinuousAlert on audit stops, new sysadmin members, grants on sensitive schemasTicket within the day
WeeklyScripted pass over the review table; match changes to change recordsSigned off exception list
MonthlyCheck sys.dm_server_audit_status on every instance; confirm files are archivingCoverage report
QuarterlySummarize logins by account type, last activity per instance, decommissionsEntry in the license position file
Before the true upPull the last four quarterly summaries for the instances in questionEvidence pack for Microsoft

How to check your own coverage

You can confirm what is configured without opening a single audit file. These catalog views and functions exist on every supported version:

  • sys.dm_server_audit_status. Shows whether each audit is started, and the current file name and size.
  • sys.server_audits and sys.server_file_audits. Show the ON_FAILURE setting, QUEUE_DELAY, file path, MAXSIZE and rollover limits.
  • sys.server_audit_specification_details and sys.database_audit_specification_details. List the action groups each specification actually contains.
  • sys.dm_audit_actions. Translates the four character action_id codes in the log into readable names for the review script.

Run the same checks across every production instance. A single instance with the audit stopped or without a database specification is the gap an investigator finds first, and it is also the instance for which you will have no licensing history.

How much storage does a year of audit files need?

Size the target from measured volume. Run the audit for two weeks, read the file sizes from sys.dm_server_audit_status, and project forward. The example below is hypothetical and shows the arithmetic.

Worked example: retention sizing for one instance (hypothetical volumes)
StepCalculationResult
Measured daily volumeTwo week test with scoped action groups150 MB per day
One year of history150 MB x 365 days54,750 MB, about 53.5 GB
File sizeMAXSIZE = 256 MBAbout 214 files a year
Local windowMAX_ROLLOVER_FILES = 307,680 MB, about 51 days on the audit volume
ArchiveCopy closed files weekly to write protected storageThe rest of the 12 months

Keeping only a short window on the server limits the damage if the volume fills, while the archive holds the full year. Set MAX_ROLLOVER_FILES deliberately: the default is unlimited, and SQL Server deletes the oldest file only once a limit is reached.

How the setup changes with the size of the environment

With five to ten instances, the weekly script can run on each server and write to a local review table. The control holds up as long as someone outside the DBA team signs off each week and the sign off is kept.

With several hundred instances, deploy the audit objects from one Transact SQL script held in source control so every server matches. Copy closed .sqlaudit files to a central share, where one server reads them with sys.fn_get_audit_file and loads a single review table. The coverage checks above then run as one report across the whole fleet.

What have we seen in SQL Server audit reviews in 2024 and 2025?

Across roughly 30 to 40 Microsoft customer environments I reviewed in 2024 and 2025, SQL Server Audit was either off or switched on and never read. Three patterns came up again and again.

  • Enabled, then ignored. Most regulated organizations had audit specifications in place, but fewer than 1 in 4 had anyone reviewing the output on a schedule.
  • Failed logins mistaken for an audit. The default login auditing setting, which writes failed logins to the error log, was treated as auditing. Schema changes and permission grants went unrecorded.
  • Licensing value missed. Teams that kept their audit logs answered Microsoft true up questions far better than teams that had discarded them.

Why treating the audit as a pure security control wastes half its value

The usual advice treats SQL Server Audit as a security control and stops once it is enabled for the compliance checklist. We disagree. In roughly 30 of those 30 to 40 environments, the same audit trail was the deciding licensing evidence.

It documented when instances were decommissioned, when features stopped being used, and which logins were service accounts and which were people. Customers with 12 months of audit history answered Microsoft true ups and audits from records, while those without it negotiated from memory. Configure the audit for security and retain it for licensing.

A developer at a desk watching monitoring dashboards on several screens
The same timestamped records serve two readers: the security team looking for misuse, and the license manager who has to show Microsoft when an instance went quiet.
An enabled audit that no one reads is a liability with a green checkbox. The control is the review cadence, and the specification only makes it possible.

How does the SQL Server audit log help in Microsoft licensing reviews?

Audit history is contemporaneous evidence of how SQL Server was actually deployed and used. In Microsoft true ups and audits it separates people from service accounts, proves decommission dates with timestamps, and shows the absence of activity that supports an unused instance claim.

The Product Terms define licensing by what ran and who accessed it, so a dated record carries more weight than a recollection.

Where the evidence counts, and where it does not

  • Server and CAL instances. Login records help you count the people and devices that need CALs. They do not remove anyone: under Microsoft's multiplexing rules, users behind a pooled service account still need CALs, so use the log to count correctly.
  • Per core instances. Cores are counted regardless of how many people connect, so the login split changes nothing here. The value is in decommission dates. An installed instance that kept running still needs licenses even if no one logged in, so pair the idle record with the audit stop event or the date the service was removed.
  • Developer edition claims. Developer edition may not serve production. Records showing that only named developers and test tools connected, by login and application_name, back up the claim.

What the auditor will say, and what to answer

  • "The instance appears in the inventory scan, so it needs licenses for the whole period." Show the last successful login and the final server state change from the audit history, and ask for the count to stop at the decommission date.
  • "Every login in the database is a user who needs a CAL." Provide the quarterly split of named people and service accounts, with the people behind each service account counted once.
  • "This Developer edition server looks like production." Produce the login and application history for the review period. If production traffic does appear, you find it before the auditor does and can add it at your next true up on your agreement pricing.
  • "Without records, we will assume peak usage." Hand over the quarterly summaries and the archived files behind them. Records usually settle this point quickly.

Common mistakes that cost money later

  • Letting rollover delete history. A small MAX_ROLLOVER_FILES value with no archive leaves you with weeks of evidence when Microsoft asks about the year.
  • Decommissioning without a record. Stopping an instance with the audit already off leaves no proof of the date. Keep the audit running until shutdown and archive the final files.
  • Keeping raw files only. Few teams can query a year of binary files under audit deadline pressure. The quarterly summary is what you actually hand over.

Keep at least a year of rollover files, archive them with the same discipline as financial records, and export a quarterly summary into your license position file. The storage costs almost nothing, and the records pay off in a true up or an audit, when the amounts at stake are largest.

Our SQL Server audit defense service and the EA true up guide show how that evidence is used.

What to do next

  1. This month. Create a file targeted server audit with a deliberate ON_FAILURE choice on every production instance.
  2. Same change. Bind a server audit specification covering logins, role changes and audit changes.
  3. Database by database. Scope database audit specifications to sensitive schemas and tables, not whole databases.
  4. Within a week. Schedule the weekly scripted review with alerts on tampering signals.
  5. Retention. Set rollover to hold a local window, archive every closed file for the full retention period, and treat the archive like financial records.
  6. Every quarter. Export a summary into your Microsoft license position file.

Our Microsoft practice covers SQL Server licensing defense, and the Microsoft hub holds the related true up and hybrid licensing guides, including SQL Server licensing in 2026. To find overspend across all your vendors, run the software spend health check.

Frequently asked questions

How do I enable SQL Server Audit?

Create a server audit with a file target and a chosen ON_FAILURE setting, add a server audit specification for instance events, then add database audit specifications scoped to sensitive schemas. Enable the audit and each specification with STATE = ON, because all of them are created disabled. Management Studio and Transact SQL both work.

Does SQL Server Audit hurt performance?

Only slightly when it is scoped. File targeted audits covering logins, role changes and schema changes add overhead in the low single digit percent range. Leave QUEUE_DELAY at its 1,000 millisecond default rather than 0, and avoid auditing every read on busy OLTP tables.

What should we review in the audit log each week?

New role members, permission grants made outside change windows, object changes without a change record, audit state changes and gaps in the file sequence. Script the pass into a review table and alert the same day on the rare events, such as a new sysadmin member.

Is SQL Server Audit available in Standard edition?

Yes. Server level auditing has worked in all editions for years, and since SQL Server 2016 Service Pack 1 database audit specifications do too. Before that, database level auditing needed Enterprise, Developer or Evaluation edition.

Can audit logs help with Microsoft licensing audits?

Yes, when you have kept them. They date decommissions, show idle instances and support Developer edition claims with login and application history. They do not reduce CAL counts for people who connect through a shared service account, since multiplexing rules still count those users.

Where are SQL Server audit files stored and how do I read them?

They are written to the folder named in FILEPATH when the server audit is created, as .sqlaudit files whose names include the audit name and a GUID. Read them with sys.fn_get_audit_file, using a wildcard to cover every file in the set.

Who can read the SQL Server audit log?

On SQL Server 2022 a reviewer needs the VIEW SERVER SECURITY AUDIT permission, so read access can be granted without full administrative rights. On SQL Server 2019 and earlier, reading the audit requires CONTROL SERVER.

Newsletter
Licensing news that changes what you pay

One email a week on vendor price moves, audit activity and what worked in recent renewals.

Subscribe
Vendor Shield
An advisor on call for every vendor conversation

Always on advisory for renewals, audits and contract questions across your software vendors.

Explore Vendor Shield
Advisory White Paper

Get the SQL Server licensing guide from our Microsoft practice.

An audit configuration baseline, an outline of the weekly review script, a retention policy template and the true up evidence checklist.

Gated with a work email on the download page. No sales follow up you did not ask for.

Get the White Paper →
We never share your details with vendors.

Microsoft licensing news, once a week.

Price changes, audit activity and what worked in recent renewals. No vendor spin.