---
title: "Microsoft SQL Server data source | Grafana Cloud documentation"
description: "Guide for using Microsoft SQL Server in Grafana"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Microsoft SQL Server data source

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.

## Supported features

Expand table

| Feature     | Supported |
|-------------|-----------|
| Metrics     | Yes       |
| Alerting    | Yes       |
| Annotations | Yes       |

## Supported versions

Expand table

| 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.

## Authentication methods

The Microsoft SQL Server data source supports the following authentication methods:

Expand table

| 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                |

> 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.

For configuration details, refer to [Configure the Microsoft SQL Server data source](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mssql/configure).

## Get started

The following documentation helps you set up and use the Microsoft SQL Server data source:

- [Configure the data source](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mssql/configure)
- [Query editor](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mssql/query-editor)
- [Template variables](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mssql/template-variables)
- [Annotations](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mssql/annotations)
- [Alerting](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mssql/alerting)
- [Troubleshooting](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mssql/troubleshooting)

## Additional features

After you configure the data source, you can:

- Use [Explore](/docs/grafana/next/explore/) to query data without building a dashboard
- Create [visualizations](/docs/grafana/next/panels-visualizations/visualizations/) including time series, tables, and gauges
- Add [transformations](/docs/grafana/next/panels-visualizations/query-transform-data/transform-data/) to manipulate query results
- Optimize performance with [query caching](/docs/grafana/next/administration/data-source-management/#query-and-resource-caching) (Grafana Enterprise and Cloud)

## Related data sources

- [PostgreSQL](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/postgres/)
- [MySQL](/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/mysql/)
