Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/observe-and-act/monitor-infrastructure/database-observability/set-up/sqlserver.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/observe-and-act/monitor-infrastructure/database-observability/set-up/sqlserver/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Set up SQL Server
Set up Database Observability with Grafana Cloud for SQL Server databases. Choose the guide that matches your deployment type.
Warning
Support for SQL Server is considered experimental. To enable and use an experimental component, you must run Alloy with
--stability.level=experimental.
How collection works
Database Observability for SQL Server uses the database_observability.sql_server Alloy component and collects at two different scopes from a single connection:
- Schema details are collected from every database on the instance that the monitoring login can access, minus excluded system databases.
- Query metrics and query text are collected only from the database named in the connection string, because SQL Server Query Store is per database.
Point the data_source_name at a user database that has Query Store enabled, not a system database such as master. To collect query metrics from several databases on one instance, add one database_instance block per database.
Note
On Azure SQL Database, the
USEstatement can’t switch databases, so each connection collects from only the database named in its connection string.
Was this page helpful?
Related resources from Grafana Labs


