Returns a row for each of the availability replicas that belong to any AlwaysOn availability group in the WSFC failover cluster.
If the local server instance is unable to talk to the WSFC failover cluster, for example because the cluster is down or quorum has been lost, only rows for local availability replicas are returned. These rows will contain only the columns of data that are cached locally in metadata.
Unique ID of the replica.
Unique ID of the availability group to which the replica belongs.
ID for the local metadata object for availability replicas in the Database Engine.
Server name of the instance of SQL Server that is hosting this replica and, for a non-default instance, its instance name.
Security identifier (SID) registered to this server instance for the external owner of this availability replica.
NULL for non-local availability replicas.
String representation of the user-specified database mirroring endpoint that is used by connections between primary and secondary replicas for data synchronization. For information about the syntax of endpoint URLs, see Specify the Endpoint URL When Adding or Modifying an Availability Replica (SQL Server).
NULL = Unable to talk to the WSFC failover cluster.
To change this endpoint, use the ENDPOINT_URL option of ALTER AVAILABILITY GROUP Transact-SQL statement.
The availability mode of the replica, one of:
For more information, see Availability Modes (AlwaysOn Availability Groups).
Description of availability_mode, one of:
To change this the availability mode of an availability replica, use the AVAILABILITY_MODE option of ALTER AVAILABILITY GROUP Transact-SQL statement.
The failover mode of the availability replica, one of:
To view a rollup of the database synchronization health of every availability database in an availability replica, use the synchronization_health and synchronization_health_desc columns of the sys.dm_hadr_availability_replica_states dynamic management view. The rollup considers the synchronization state of every availability database and the availability mode of its availability replica.
Description of failover_mode, one of:
To change the failover mode, use the FAILOVER_MODE option of ALTER AVAILABILITY GROUP Transact-SQL statement.
The time-out period, in seconds. The time-out period is the maximum time that the replica waits to receive a message from another replica before considering connection between the primary and secondary replica have failed. Session timeout detects whether secondaries are connected the primary replica.
On detecting a failed connection with a secondary replica, the primary replica considers the secondary replica to be NOT_SYNCHRONIZED. On detecting a failed connection with the primary replica, a secondary replica simply attempts to reconnect.
To change this value, use the SESSION_TIMEOUT option of ALTER AVAILABILITY GROUP Transact-SQL statement.
Whether the availability allows all connections or only read-write connections, one of:
2 = All (default)
3 = Read write
Description of primary_role_allow_connections, one of:
Whether an availability replica that is performing the secondary role (that is, a secondary replica) can accept connections from clients, one of:
0 = No. No connections are allowed to the databases in the secondary replica, and the databases are not available for read access. This is the default setting.
1 = Read only. Only read-only connections are allowed to the databases in the secondary replica. All database(s) in the replica are available for read access.
2 = All. All connections are allowed to the databases in the secondary replica for read-only access.
For more information, see Active Secondaries: Readable Secondary Replicas (AlwaysOn Availability Groups).
Description of secondary_role_allow_connections, one of:
Date that the replica was created.
NULL = Replica not on this server instance.
Date that the replica was last modified.
NULL = Replica not on this server instance.
Represents the user-specified priority for performing backups on this replica relative to the other replicas in the same availability group. The value is an integer in the range of 0..100.
For more information, see Active Secondaries: Backup on Secondary Replicas (AlwaysOn Availability Groups).
Connectivity endpoint (URL) of the read only availability replica. For more information, see Configure Read-Only Routing for an Availability Group (SQL Server).