sys.dm_hadr_cluster_members (Transact-SQL)

sys.dm_hadr_cluster_members (Transact-SQL)

 

Updated: June 10, 2016

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

If the WSFC node that hosts a local instance of SQL Server that is enabled for Always On Availability Groups has WSFC quorum, returns a row for each of the members that constitute the quorum and the state of each of them. This includes of all nodes in the cluster (returned with CLUSTER_ENUM_NODE type by the Clusterenum function) and the disk or file-share witness, if any. The row returned for a given member contains information about the state of that member. For example, for a five node cluster with majority node quorum in which one node is down, when sys.dm_hadr_cluster_members is queried from a server instance that is that is enabled for Always On Availability Groups that resides on a node with quorum, sys.dm_hadr_cluster_members reflects the state of the down node as "NODE_DOWN".

If the WSFC node has no quorum, no rows are returned.

Use this dynamic management view to answer the following questions:

  • What nodes are currently running on the WSFC cluster?

  • How many more failures can the WSFC cluster tolerate before losing quorum in a majority-node case?

System_CAPS_ICON_tip.jpg Tip

Beginning in SQL Server 2014, this dynamic management view supports Always On Failover Cluster Instances in addition to Always On Availability Groups.

Column nameData typeDescription
member_namenvarchar(128)Member name, which can be a computer name, a drive letter, or a file share path.
member_typetinyintThe type of member, one of:

0 = WSFC node

1 = Disk witness

2 = File share witness
member_type_descnvarchar(50)Description of member_type, one of:

CLUSTER_NODE

DISK_WITNESS

FILE_SHARE_WITNESS
member_statetinyintThe member state, one of:

0 = Offline

1 = Online
member_state_descnvarchar(60)Description of member_state, one of:

OFFLINE

ONLINE
number_of_quorum_votestinyintNumber of quorum votes possessed by this quorum member. For No Majority: Disk Only quorums, this value defaults to 0. For other quorum types, this value defaults to 1.

Requires VIEW SERVER STATE permission on the server.

Always On Availability Groups Dynamic Management Views and Functions (Transact-SQL)
Always On Availability Groups Catalog Views (Transact-SQL)
Monitor Availability Groups (Transact-SQL)
AlwaysOn Availability Groups (SQL Server)

Community Additions

ADD
Show:
© 2016 Microsoft