Always On Policies for Operational Issues with Always On Availability Groups (SQL Server)


Published: May 17, 2016

Updated: May 17, 2016

Applies To: SQL Server 2016

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2016)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

The Always On Availability Groups health model evaluates a set of predefined policy based management (PBM) policies. You can use theses for viewing the health of an availability group and its availability replicas and databases in SQL Server 2016.

In this Topic:

Always On predefined policies
A set of built-in policies that allow a database administrator to check an availability group and its availability replicas and databases for compliance with the states that are defined by the Always On policies.

Always On Availability Groups
A high-availability and disaster-recovery solution that provides an enterprise-level alternative to database mirroring.

availability group
A container for a discrete set of user databases, known as availability databases, that fail over together.

availability replica
An instantiation of an availability group that is hosted by a specific instance of SQL Server and that maintains a local copy of each availability database that belongs to the availability group. Two types of availability replicas exist: a single primary replica and one to four secondary replicas. The server instances that host the availability replicas for a given availability group must reside on different nodes of a single Windows Server Failover Clustering (WSFC) cluster.

availability database
A database that belongs to an availability group. For each availability database, the availability group maintains a single read-write copy (the primary database) and one to four read-only copies (secondary databases).

Always On Dashboard
A SQL Server Management Studio dashboard that provides an at-a-glance view of the health of an availability group. For more information, see Always On Dashboard, later in this topic.

The following table summarizes the predefined policies.

Policy nameIssueCategory*Facet
WSFC Cluster StateWSFC cluster service is offline.CriticalInstance of SQL Server
Availability Group Online StateAvailability group is offline.CriticalAvailability group
Availability Group Automatic Failover ReadinessAvailability group is not ready for automatic failover.CriticalAvailability group
Availability Replicas Data Synchronization StateSome availability replicas are not synchronizing data.WarningAvailability group
Synchronous Replicas Data Synchronization StateSome synchronous replicas are not synchronized.WarningAvailability group
Availability Replicas Role StateSome availability replicas do not have a healthy role.WarningAvailability group
Availability Replicas Connection StateSome availability replicas are disconnected.WarningAvailability group
Availability Replica Role StateAvailability replica does not have a healthy role.CriticalAvailability replica
Availability Replica Connection StateAvailability replica is disconnected.CriticalAvailability replica
Availability Replica Join StateAvailability replica is not joined.WarningAvailability replica
Availability Replica Data Synchronization StateData synchronization state of some availability database is not healthy.WarningAvailability replica
Availability Database Suspension StateAvailability database is suspended.WarningAvailability database
Availability Database Join StateSecondary database is not joined.WarningAvailability database
Availability Database Data Synchronization StateData synchronization state of availability database is not healthy.WarningAvailability database
System_CAPS_ICON_important.jpg Important

* For Always On policies, the category names are used as IDs. Changing the name of an Always On category would break its health-evaluation functionality. Therefore, do not modify the names of Always On categories.

The Always On Dashboard gives you an at-a-glance view of the health of an availability group. The Always On Dashboard includes the following features:

  • Enables you to easily display details about a given availability group, its availability replicas, and its databases.

  • Displays visual indications of key states to help database administrators make quick operational decisions.

  • Provides launch points for troubleshooting scenarios.

  • For a given operational issue, populates the Policy Evaluation Result dialog box with information about specific Always On health policy violations and with links to remediation help.

  • Provides an health extended event viewer to show previous events for Always On-specific issues.

  • If failing over the availability group is a possible remediation for an issue, provides a launch point for the linksFail Over Availability Group Wizard. This wizard takes a database administrator through the manual failover process.

Extending the Always On Availability Groups health model is simply a matter of creating your own user-defined policies and putting them into certain categories based on the type of object that you are monitoring. After you a alter few settings, the Always On dashboard will automatically evaluate your own user-defined policies, as well as the Always On predefined policies.

A user-defined policy can use any of the available PBM facets, including those used by the Always On predefined policies (see [Predefined Policies and Issues](#Always OnPBM), earlier in this topic). The Server facet provides the following properties for monitoring Always On Availability Groups health: (IsHadrEnabled and HadrManagerStatus). The Server facet also provides properties the following policies for monitoring the WSFC cluster configuration: ClusterQuorumType, and ClusterQuorumState.

For more information, see [The Always On Health Model Part 2 -- Extending the Health Model]( On/archive/2012/02/13/extending-the-Always On-health-model.aspx) (a SQL Server Always On Team blog).

Always On Availability Groups (SQL Server)
Overview of Always On Availability Groups (SQL Server)
Administration of an Availability Group (SQL Server)
Monitoring of Availability Groups (SQL Server)

Community Additions