Modern enterprises rely heavily on Microsoft SQL Server (MSSQL) to power mission-critical applications. However, without proper monitoring, SQL Server performance issues can go unnoticed, leading to downtime, slow queries, and business impact.
Table of Contents
Objective
The objective of this document is to monitor MSSQL performance metrics on a Windows Server using Prometheus and Grafana.
The goal is to help you set up a reliable monitoring pipeline that includes:
- Installing MSSQL Server and SQL Server Management Studio (SSMS)
- Enabling SQL Server Agent
- Installing and configuring the Windows Exporter
- Setting up Prometheus and Grafana on Ubuntu
- Visualizing MSSQL metrics in Grafana dashboards
Requirements
Before starting, ensure the following prerequisites are met:
| Component | Description |
|---|---|
| Windows Server | Host machine where MSSQL Server is installed |
| MSSQL Server 2022 Developer Edition | Database engine to monitor |
| SQL Server Management Studio (SSMS) | Tool for database administration and queries |
| Prometheus | Metrics collection tool (installed on Ubuntu) |
| Grafana | Visualization and dashboarding tool (installed on Ubuntu) |
| Windows Exporter | Exposes Windows system and MSSQL performance metrics |
| Open Ports | 9182 (Windows Exporter), 9090 (Prometheus), 3000 (Grafana) |
Installation and Setup of MSSQL
Download and Install MSSQL
- Visit the official SQL Server download page.
- Under SQL Server 2022 Developer Edition, click Download now.
- During installation:
- Select Basic installation
- Accept the license terms
- Click Install
- The setup takes around 10–20 minutes
- Keep the default instance name unless you want to customize it.
- Click Connect when installation is completed.
Install SQL Server Management Studio (SSMS)
- Download SSMS from the official Microsoft website
- Run the installer and complete the setup.
Enable SQL Server Agent in SSMS
Prometheus relies on SQL Server Agent to expose certain SQL-related metrics.
- Open SSMS.
- In Object Explorer, locate SQL Server Agent.
- Right-click → Start

Enabling Automatic Start for SQL Server Agent
Follow the steps below to configure the SQL Server Agent service to start automatically when Windows boots:
- Press Windows + R to open the Run dialog.
- Type services.msc and press Enter to open the Services window.
- Locate the service named SQL Server Agent (), where <InstanceName> is the name of your SQL Server instance.
- Double-click the SQL Server Agent service to open its Properties window.
- In the Startup type dropdown menu, select Automatic. – You can also choose Automatic (Delayed Start) if you want other services to start first.

- Click Apply, and then OK to save the changes. To verify it check startup type changes automatically.

Install Prometheus Windows Exporter
Prometheus Windows Exporter helps expose system and MSSQL metrics for monitoring.
Steps:
- Download Windows Exporter
Visit the official releases page to download the latest version of Windows Exporter.
- Download the Binary File
Select and download the binary file:
- Open Command Prompt as Administrator
- Press Start → Search “cmd” → Right-click → Run as Administrator.
- Run the Exporter Manually
Execute the following command to start the Windows Exporter and fetch SQL Server statistics:
"C:\Program Files\windows_exporter\windows_exporter-0.31.3-amd64.exe" --collectors.enabled="cpu,logical_disk,net,os,service,system,textfile,mssql"
5.Verify the Metrics Endpoint
- Press Open your browser and navigate to: http://PublicIp:9182/metrics
Run Windows Exporter Automatically After System Restart
To ensure the Windows Exporter service starts automatically after a system reboot, follow these steps
Case Study : Accelerating a Global Tech Leader’s Ads Platform with Strategic DevOps, Platform, and Data Engineering
Open Registry Editor
- Press Start → Search “regedit” → Open Registry Editor
- Navigate to the Following Path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\windows_exporter Modify the ImagePath Value,Double-click on ImagePath.
Replace the existing value with the following (adjust if your installation path differs):
"C:\Program Files\windows_exporter\windows_exporter-0.31.3-amd64.exe" --collectors.enabled="cpu,logical_disk,net,os,service,system,textfile,mssql"

- Press Windows + R to open the Run dialog.
- Type services.msc and press Enter to open the Services window.
- Double-click the window exporter service to open its Properties window.
- In the Startup type dropdown menu, select Automatic, You can also choose Automatic (Delayed Start) if you want other services to start first.

Conclusion
Monitoring MSSQL on Windows Server using Windows Exporter, Prometheus, and Grafana provides deep visibility into database health and system performance.
Related Searches – Data Engineering Solutions | Database Migration Services | Best data engineering company in India