AvailabilityGroupState AvailabilityGroupState AvailabilityGroupState Class

Definition

This is an adapter class that implements the IAvailabilityGroupState logical facet for an Availability Group.

public class AvailabilityGroupState : Microsoft.SqlServer.Management.Common.IRefreshable, Microsoft.SqlServer.Management.Facets.IDmfAdapter, Microsoft.SqlServer.Management.Sdk.Sfc.IDmfFacet, Microsoft.SqlServer.Management.Smo.IAvailabilityGroupState
type AvailabilityGroupState = class
    interface IAvailabilityGroupState
    interface IDmfFacet
    interface IDmfAdapter
    interface IRefreshable
Public Class AvailabilityGroupState
Implements IAvailabilityGroupState, IDmfAdapter, IDmfFacet, IRefreshable
Inheritance
AvailabilityGroupStateAvailabilityGroupStateAvailabilityGroupState
Implements

Constructors

AvailabilityGroupState(AvailabilityGroup) AvailabilityGroupState(AvailabilityGroup) AvailabilityGroupState(AvailabilityGroup)

Initializes a new instance of the AvailabilityGroupState class.

Properties

IsAutoFailover IsAutoFailover IsAutoFailover

Gets a value indicating whether the failover mode of the availability group is is Automatic Failover. Accessing this property may result in an exception, so we initialize it seperately. Specifically, if the primary replica is not currently visible, we throw an exception indicating this. This only occurs when accessing this property from a secondary replica that cannot communicate with the cluster store.

IsOnline IsOnline IsOnline

Gets a value indicating whether the Availability Group is up. This is true if a functioning primary replica exists for the Availability Group.

NumberOfDisconnectedReplicas NumberOfDisconnectedReplicas NumberOfDisconnectedReplicas

Gets the nubmer of replicas that are not in a "Connected" state

NumberOfNotSynchronizedReplicas NumberOfNotSynchronizedReplicas NumberOfNotSynchronizedReplicas

Gets the number of replicas that are not in a "Synchronized" state. Since only synchronous replicas can be in a "synchronized" state, this does not apply to asynchronous replicas

NumberOfNotSynchronizingReplicas NumberOfNotSynchronizingReplicas NumberOfNotSynchronizingReplicas

Gets the nubmer of replicas in a "Not Synchronizing" state.

NumberOfReplicasWithUnhealthyRole NumberOfReplicasWithUnhealthyRole NumberOfReplicasWithUnhealthyRole

Gets the number of replicas that are neither a primary or a secondary in the Availability Group.

NumberOfSynchronizedSecondaryReplicas NumberOfSynchronizedSecondaryReplicas NumberOfSynchronizedSecondaryReplicas

Gets the number of synchronous secondary replicas with Automatic Failover mode and Synchronized state.

Methods

Refresh() Refresh() Refresh()

Refresh the availability group state data.

Applies to