| title | sys.dm_hadr_availability_replica_cluster_states (Transact-SQL) | ||||
|---|---|---|---|---|---|
| description | sys.dm_hadr_availability_replica_cluster_states returns a row for each replica of all AGs in the Windows Server failover cluster. | ||||
| author | rwestMSFT | ||||
| ms.author | randolphwest | ||||
| ms.date | 04/17/2023 | ||||
| ms.service | sql | ||||
| ms.subservice | system-objects | ||||
| ms.topic | reference | ||||
| f1_keywords |
|
||||
| helpviewer_keywords |
|
||||
| dev_langs |
|
[!INCLUDE SQL Server]
Returns a row for each Always On availability replica (regardless of its join state) of all Always On availability groups (regardless of replica location) in the Windows Server Failover Clustering (WSFC) cluster.
| Column name | Data type | Description |
|---|---|---|
| replica_id | uniqueidentifier | Unique identifier of the availability replica. |
| replica_server_name | nvarchar(256) | Name of the instance of [!INCLUDEssNoVersion] hosting the replica. |
| group_id | uniqueidentifier | Unique identifier of the availability group. |
| join_state | tinyint | - 0 = Not joined - 1 = Joined, standalone - 2 = Joined, failover cluster instance |
| join_state_desc | nvarchar(60) | - NOT_JOINED - JOINED_STANDALONE - JOINED_FCI |
For [!INCLUDE sssql19-md] and earlier versions, requires VIEW SERVER STATE permission on the server.
For [!INCLUDE sssql22-md] and later versions, requires VIEW SERVER PERFORMANCE STATE permission on the server.