
Rudi Bruchez EI · www.pachadata.com · rudi@pachadata.com · +33 6 22 48 76 99
Consulting, audit, performance tuning, solutions, training
SQL Server OLTP and BI / NoSQL
Version of November 30, 2026 (d3a32c4e) · https://www.pachadata.com/en/services/client-instructions/sql-auditor-collection/
Collecting the state of an instance with SQL Auditor
Categories:
3 minute read
SQL Auditor is the collector I use for remote audits. It reads the system
catalog views and dynamic management views of an instance (waits, index usage,
missing indexes, configuration, backups) and writes the result to a .zip
archive. It only issues SELECT statements, reads the contents of none of your
application tables, writes nothing to your databases and installs nothing. It is
free software:
github.com/rudi-bruchez/sql-auditor.
This page gives the simplest way to run it, on Windows, with an account that has every right. For a collection with a restricted login, or to review the tool before authorizing it, the DBA guide covers everything.
Downloading
Download sql-auditor_XXX_windows_amd64.zip from the
releases page, on
the server or on a machine that connects to the instance.
If you can, unpack it with tar in PowerShell:
tar -xf sql-auditor_0.39.0_windows_amd64.zip
cd sql-auditor_0.39.0_windows_amd64
Unpacking with File Explorer marks the executable as downloaded from the
Internet, and SmartScreen blocks it at launch. tar does not mark it.
Running the collection
Open PowerShell as a Windows account that is a member of the instance’s
sysadmin role, in the unpacked folder, and replace SERVER\INSTANCE with the
name of your instance (SERVER alone for a default instance):
$env:SQL_TRUST_SERVER_CERTIFICATE = "true"
.\sql-auditor.exe collect --server SERVER\INSTANCE
- With no user name, the connection uses Windows authentication, as the account
running the command. With a
sysadminaccount, no right is missing. - The first line is needed when the instance has a self-signed certificate, which is the most common case. Without it, SQL Auditor refuses to connect and explains why. It encrypts the connection without validating the server certificate: use it only on a network you know.
- Run it outside peak hours if you can. The collection changes nothing, but it reads the plan cache and a sample of the pages of the largest tables without a clustered index (heaps), which costs CPU and I/O on a large instance.
The collection takes from a few seconds to a few minutes, depending on the number of databases. It ends with a summary line, then the path of the archive:
409 result(s), 15 skipped, 0 error(s)
output/SERVER-2026-11-30.zip
That file is the one to send me. The MANIFEST.txt file inside it says what
was collected, what was skipped and why. Skipped collectors either do not apply
to your version or need an option: they are not errors.
Reviewing before running
Two commands let you check what the tool will do, without collecting anything:
# Write the queries the tool runs to a folder, in plain text
.\sql-auditor.exe queries export --to .\queries
# List what will be collected and which rights the account lacks
.\sql-auditor.exe check --server SERVER\INSTANCE
Contact
I have been an independent SQL Server consultant since 2006. I help when an application slows down, when a server costs too much in storage or licenses, or when a migration must not stop production: audit and diagnosis, query and index tuning, migrations, high availability, training. On site, or as a remote audit delivered in five working days.
rudi@pachadata.com · +33 6 22 48 76 99 · www.pachadata.com/en/contact/