SQL Monitoring
This page defines the minimum SQL Server permissions needed for monitoring.
Create a monitoring login (per SQL instance)
Section titled “Create a monitoring login (per SQL instance)”All SQL instances should have a dedicated monitoring login.
USE master;
-- Use a strong password and store it in your secret manager.
CREATE LOGIN monitor WITH PASSWORD = N'<strong_password>', CHECK_POLICY = ON;
GO
GRANT VIEW SERVER STATE TO monitor;
GO
GRANT VIEW ANY DEFINITION TO monitor;
GOOperational notes
Section titled “Operational notes”- Rotate this password periodically and update the monitoring tool configuration.
- Do not reuse human accounts for monitoring.