Share via


AvailabilityReplica Class

Displays the availability replica and its properties.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Management.Smo.SmoObjectBase
    Microsoft.SqlServer.Management.Smo.SqlSmoObject
      Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Smo.AvailabilityReplica

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<PhysicalFacetAttribute> _
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
Public NotInheritable Class AvailabilityReplica _
    Inherits NamedSmoObject _
    Implements ICreatable, IDroppable, IAlterable, IScriptable
'Usage
Dim instance As AvailabilityReplica
[PhysicalFacetAttribute]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
public sealed class AvailabilityReplica : NamedSmoObject, 
    ICreatable, IDroppable, IAlterable, IScriptable
[PhysicalFacetAttribute]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
public ref class AvailabilityReplica sealed : public NamedSmoObject, 
    ICreatable, IDroppable, IAlterable, IScriptable
[<SealedAttribute>]
[<PhysicalFacetAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
type AvailabilityReplica =  
    class 
        inherit NamedSmoObject 
        interface ICreatable 
        interface IDroppable 
        interface IAlterable 
        interface IScriptable 
    end
public final class AvailabilityReplica extends NamedSmoObject implements ICreatable, IDroppable, IAlterable, IScriptable

The AvailabilityReplica type exposes the following members.

Constructors

  Name Description
Public method AvailabilityReplica() Initializes a new instance of the AvailabilityReplica class with specified default values.
Public method AvailabilityReplica(AvailabilityGroup, String) Initializes a new instance of the AvailabilityReplica class on the specified availability group and with the specified name.

Top

Properties

  Name Description
Public property AvailabilityMode Gets or sets the value that represents the availability mode for the availability replica.
Public property BackupPriority Gets or sets the value of the backup priority of the AvailabilityReplica
Public property ConnectionModeInPrimaryRole Gets or sets the connection model of the availability replica in primary role.
Public property ConnectionModeInSecondaryRole Gets or sets the connection model of the availability replica in secondary role.
Public property ConnectionState Gets the current connection state of the availability replica.
Public property CreateDate Gets the date and time when the availability replica was created.
Public property DateLastModified Gets the date and time when the replica was last modified.
Public property EndpointUrl Gets or sets the URL of the endpoint.
Public property FailoverMode Gets or sets the failover mode of the availability replica.
Public property JoinState Gets the availability replica join state.
Public property LastConnectErrorDescription Gets or sets the description of the error during the last connection.
Public property LastConnectErrorNumber Gets or sets the number of the error during the last connection.
Public property LastConnectErrorTimestamp Gets the timestamp of the error during the last connection.
Public property MemberState Gets the state of the cluster member.
Public property Name Gets or sets the name of the object. (Inherited from NamedSmoObject.)
Public property OperationalState Gets the value for operational state.
Public property Owner Gets or sets the owner of the availability replica.
Public property Parent Gets the availability group that is the parent of the availability replica.
Public property Properties Gets a collection of Property objects that represent the object properties. (Inherited from SqlSmoObject.)
Public property QuorumVoteCount Gets the quorum vote count.
Public property ReadonlyRoutingConnectionUrl Gets or sets the read only routing connection url for the availability replica.
Public property ReadonlyRoutingList Gets or sets the read only routing connection list for the availability replica.
Public property Role Gets the replica role object associated with this instance.
Public property RollupRecoveryState Gets or sets the rollup recovery state of the availability replica.
Public property RollupSynchronizationState Gets or sets the rollup synchronization state of the availability replica.
Public property SessionTimeout Gets or sets the timeout of the availability replica.
Public property State Gets the state of the referenced object. (Inherited from SmoObjectBase.)
Public property UniqueId Gets the unique, hierarchically qualified identifier for the availability replica.
Public property Urn Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (Inherited from SqlSmoObject.)
Public property UserData Gets or sets user-defined data associated with the referenced object. (Inherited from SmoObjectBase.)

Top

Methods

  Name Description
Public method Alter Alters the availability replica.
Public method Create Creates an availability replica for the availability group.
Public method Discover Discovers a list of type Object. (Inherited from SqlSmoObject.)
Public method Drop Drops an availability replica from the availability group.
Public method Equals (Inherited from Object.)
Protected method FormatSqlVariant Formats an object as SqlVariant type. (Inherited from SqlSmoObject.)
Protected method GetContextDB Gets the context database that is associated with this object. (Inherited from SqlSmoObject.)
Protected method GetDBName Gets the database name that is associated with the object. (Inherited from SqlSmoObject.)
Public method GetHashCode (Inherited from Object.)
Protected method GetPropValue Gets a property value of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Protected method GetPropValueOptional Gets a property value of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Protected method GetPropValueOptionalAllowNull Gets a property value of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Protected method GetServerObject Gets the server of the SqlSmoObject object. (Inherited from SqlSmoObject.)
Public method GetType (Inherited from Object.)
Public method Initialize() Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Public method Initialize(Boolean) Initializes the object and forces the properties be loaded. (Inherited from SqlSmoObject.)
Protected method IsObjectInitialized Verifies whether the object has been initialized. (Inherited from SqlSmoObject.)
Protected method IsObjectInSpace Verifies whether the object is isolated or connected to the instance of SQL Server. (Inherited from SqlSmoObject.)
Public method Refresh Reloads the availability replica. (Overrides SqlSmoObject.Refresh().)
Public method Script() Represents the collection of scripts used in the availability replica.
Public method Script(ScriptingOptions) Represents the collection of scripts with specified options used in the availability replica.
Protected method SetParentImpl Sets the parent of the SqlSmoObject to the newParent parameter. (Inherited from SqlSmoObject.)
Public method ToString Returns a String that represents the referenced object. (Inherited from SqlSmoObject.)
Public method Validate Validates the state of an object. (Inherited from SmoObjectBase.)

Top

Events

  Name Description
Public event PropertyChanged Represents the event that occurs when a property is changed. (Inherited from SqlSmoObject.)
Public event PropertyMetadataChanged Represents the event that occurs when property metadata changes. (Inherited from SqlSmoObject.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IAlienObject.Discover Discovers any dependencies. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.GetDomainRoot Returns the root of the domain. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.GetParent Gets the parent of this object. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.GetPropertyType Gets the type of the specified property. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.GetPropertyValue Gets the value of the specified property. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.GetUrn Gets the Unified Resource Name (URN) of the object. Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.Resolve Gets the instance that contains the information about the object from the Unified Resource Name (URN) of the object. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.SetObjectState Sets the object state to the specified SfcObjectState value. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method IAlienObject.SetPropertyValue Sets the property value. (Inherited from SqlSmoObject.)
Explicit interface implemetationPrivate method ISfcPropertyProvider.GetPropertySet Gets the interface reference to the set of properties of this object. (Inherited from SqlSmoObject.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SqlServer.Management.Smo Namespace