docs/sources/datasources/mssql/_index.md
Microsoft SQL Server (MSSQL) is one of the most widely used relational databases for business applications, analytics, and operational workloads. The built-in MSSQL data source lets you query your existing SQL Server instance directly from Grafana, no data migration or additional plugins required.
You can connect to Microsoft SQL Server 2012 or newer, Azure SQL Database, and Azure SQL Managed Instance.
| Feature | Supported |
|---|---|
| Metrics | Yes |
| Alerting | Yes |
| Annotations | Yes |
| Version | Supported |
|---|---|
| Microsoft SQL Server 2012+ | Yes |
| Azure SQL Database | Yes |
| Azure SQL Managed Instance | Yes |
Grafana recommends using the latest available service pack for optimal compatibility.
The Microsoft SQL Server data source supports the following authentication methods:
<!-- vale Grafana.Spelling = NO -->| Method | Best for | Grafana Cloud | Self-managed | Supports alerting |
|---|---|---|---|---|
| SQL Server Authentication | Any deployment | Yes | Yes | Yes |
| Windows Authentication (Integrated Security) | On-premises with Windows SSO | No | Yes | Yes |
| Windows AD (Kerberos) | Enterprise Active Directory environments | No | Yes | Yes |
| Azure Entra ID (App Registration) | Azure SQL with service principal | Yes | Yes | Yes |
| Azure Entra ID (Managed Identity) | Grafana hosted in Azure | No | Yes | Yes |
| Azure Entra ID (Current User) | User-level access control with Azure SQL | Yes | Yes | No |
{{< admonition type="note" >}} Azure Entra ID (Current User) authentication doesn't support alerting, reporting, or recorded queries because these features run on the backend without a user session. {{< /admonition >}}
For configuration details, refer to Configure the Microsoft SQL Server data source.
The following documentation helps you set up and use the Microsoft SQL Server data source:
After you configure the data source, you can: