Skip to main content
Use this setup for SQL Server running on your own infrastructure.

Grant collector access

Run the following as a server administrator:
For SQL Server 2022 and later, you can grant VIEW SERVER PERFORMANCE STATE instead of VIEW SERVER STATE. The collector requires one of these server-state permissions to read statement statistics and query text.

Verify permissions

Connect with the querycomment login to a monitored database, then run:
The first query confirms access to cached statement statistics. The second confirms access to query text. Either query can return no rows on an idle instance. Run representative application traffic, then check again.

Configure the collector

Continue to configure the SQL Server collector.