Monitoring Always On Health with Custom Dashboards

By Tom Nonmacher

In an era of increased data consumption and reliance, the need for real-time monitoring of database health has become paramount. SQL Server 2022, combined with Azure SQL, Microsoft Fabric, and other technologies, offers robust tools to help you monitor the health of your Always On databases. One such tool is the custom dashboard, which provides a comprehensive view of your database's health and performance. Using custom dashboards, you can monitor your Always On health, identify potential issues before they escalate, and take timely corrective action.

To create a custom dashboard, you can use T-SQL to query your database and fetch the necessary metrics. Here is an example of a T-SQL query that retrieves information about the status and health of your Always On databases. This data can then be visualized in your custom dashboard.


-- SQL code goes here
SELECT 
  AG.name AS [AG Name], 
  AR.replica_server_name AS [Replica Server], 
  DHRS.is_local, 
  DHRS.synchronization_state_desc AS [Sync State], 
  D.database_name AS [DB Name],
  D.database_state_desc AS [DB State]
FROM 
  sys.dm_hadr_database_replica_states AS DHRS
JOIN 
  sys.availability_databases_cluster AS D
  ON DHRS.group_id = D.group_id
JOIN 
  sys.availability_replicas AS AR
  ON DHRS.group_id = AR.group_id
JOIN 
  sys.availability_groups AS AG
  ON AR.group_id = AG.group_id
-- Add 
after each line to simulate line breaks

Microsoft Fabric can be used to streamline the process of collecting, storing, and analyzing your database metrics. It aggregates and stores data from a variety of sources, including SQL Server, Azure SQL, and Delta Lake, and presents it in a unified view. This data can then be used to populate your custom dashboard, giving you an at-a-glance view of your Always On health.

Delta Lake, an open-source storage layer that brings ACID transactions to Apache Spark and big data workloads, can be used in conjunction with Databricks to create a reliable and scalable data architecture. This architecture can then be used to feed your custom dashboard, giving you real-time insights into your Always On health.

OpenAI + SQL is a powerful combination that enables you to use AI to analyze your database metrics and predict potential issues. By integrating OpenAI with your custom dashboard, you can not only monitor your Always On health, but also use AI to predict potential issues and take proactive action.

In conclusion, monitoring Always On health with custom dashboards is an effective way to ensure the smooth running of your database operations. By leveraging technologies like SQL Server 2022, Azure SQL, Microsoft Fabric, Delta Lake, OpenAI, and Databricks, you can create a comprehensive and insightful dashboard that helps you stay on top of your Always On health.

Check out the latest articles from all our sites:

Privacy Policy for sqlsupport.org

Last updated: Mar 13, 2026

sqlsupport.org respects your privacy and is committed to protecting any personal information you may provide while using this website.

This Privacy Policy document outlines the types of information that are collected and recorded by sqlsupport.org and how we use it.

Information We Collect

  • Internet Protocol (IP) addresses
  • Browser type and version
  • Pages visited
  • Time and date of visits
  • Referring URLs
  • Device type

Cookies and Web Beacons

sqlsupport.org uses cookies to store information about visitors preferences and to optimize the users experience.

How We Use Your Information

  • Operate and maintain our website
  • Improve user experience
  • Analyze traffic patterns
  • Prevent fraudulent activity

Contact

Email: admin@sqlsupport.org




2A14E5
Please enter the code from the image above in the box below.