Muokkaa

Jaa


View Availability Group Properties (SQL Server)

Applies to: SQL Server

This topic describes how to view the properties of an availability group for an Always On availability group by using SQL Server Management Studio or Transact-SQL in SQL Server.

Using SQL Server Management Studio

To view and change the properties an availability group

  1. In Object Explorer, connect to the server instance that hosts the primary replica, and expand the server tree.

  2. Expand the Always On High Availability node and the Availability Groups node.

  3. Right-click the availability group whose properties you want to view, and select the Properties command.

  4. In the Availability Group Properties dialog box, use the General and Backup Preferences pages to view and, in some cases, change properties of the selected availability group. For more information, see Availability Group Properties: New Availability Group (General Page) and Availability Group Properties: New Availability Group (Backup Preferences Page).

    Use the Permissions page to view the current logins, roles, and explicit permissions associated with the availability group. For more information, see Permissions or Securables Page.

Using Transact-SQL

To view the properties and state of an availability group

To query the properties and states of the availability groups for which the server instance hosts an availability replica, use the following views:

sys.availability_groups
Returns a row for each availability group for which the local instance of SQL Server hosts an availability replica. Each row contains a cached copy of the availability group metadata.

Column names: group_id, name, resource_id, resource_group_id, failure_condition_level, health_check_timeout, automated_backup_preference, automated_backup_preference_desc

sys.availability_groups_cluster
Returns a row for each availability group in the WSFC cluster. Each row contains the availability group metadata from the Windows Server Failover Clustering (WSFC) cluster.

Column names: group_id, name, resource_id, resource_group_id, failure_condition_level, health_check_timeout, automated_backup_preference, automated_backup_preference_desc

sys.dm_hadr_availability_group_states
Returns a row for each availability group that possesses an availability replica on the local instance of SQL Server. Each row displays the states that define the health of a given availability group.

Column names: group_id, primary_replica, primary_recovery_health, primary_recovery_health_desc, secondary_recovery_health, secondary_recovery_health_desc, synchronization_health, synchronization_health_desc

Related Tasks

To view information about availability groups

To configure an existing availability group

To manually fail over an availability group

See Also

Overview of Always On Availability Groups (SQL Server)
Monitor Availability Groups (Transact-SQL)
Always On Policies for Operational Issues with Always On Availability Groups (SQL Server)