神刀安全网

Adding AlwaysOn Availability Group to Existing Failover Cluster

Overview

AlwaysOn is the latest addition in the list of high availability features hosted by SQL Server. Introduced in the year 2012, AlwaysOn enables the users to create several copies of a highly available database by making use of WSFC or Windows Server Failover Custer. At times, users require implementing Availability Group on a Failover Cluster Instance. It is to be noted that for doing this, the user does not require to create separate Windows Server Failover Clusters to do so. Moreover, all the nodes for the availability group must be present on a single WSFC and that too within the same Active Directory Domain. In this write-up, we are Adding AlwaysOn Availability Group to Existing Failover Cluster.

How to Setup Availability Group to an Existing Failover Cluster?

In this section, we are going to learn the process with which the users can setup AlwaysOn availability group via two methodologies. The method deals with the process to combine existing Failover Cluster Instance with a standalone or a failover cluster present in the secondary data center.

#Methodology 1

When Failover Cluster Is In Primary Date Center & Availability Group on a Failover Cluster in Secondary Data Center

In this scenario, the Failover Cluster Instance (FCI) is located in the primary data center and the availability group is on other FCI. As we can see from the illustration, in the Primary Database CLP_1 & CLP_2 are its nodes. Similarly, in the secondary database, the nodes are represented as CLS_1 and CLS_2.

Adding AlwaysOn Availability Group to Existing Failover Cluster

Follow the below-mentioned procedure for adding the Availability Group:

  • Add two nodes named CLS_1 & CLS_2 from the secondary data center to the existing WSFC.
  • For both the nodes, configure shared storage.
  • Install FCI instance using New SQL Server Failover Cluster Installation.
  • Join the secondary node to SQL Server FCI ‘by using Add node .
  • On newly installed FCI, enable AlwaysOn availability group.
  • Define the SQL FCI owners.

#Methodology 2

When The FCI Is In Primary Data Center & Availability Group Is on a Standalone SQL Instance

As we can see from the illustration, in the Primary Database named as SQL_PV is the FCI instance and the CL_1 & CL_2 are its nodes. These nodes have been joined to the WSFC. We have to setup the standalone SA_1 instance in the AG_1 group.

Adding AlwaysOn Availability Group to Existing Failover Cluster

Follow the below-mentioned steps to add the standalone instance:

  • Enable AlwaysOn High Availability on existing CL_1 and CL_2 FCI instance.
  • Open SQL Server Configuration Manager.
  • Select SQL Server Services option and then click on SQL Server option.

    Select Properties option.

  • Under the AlwaysOn High Availability tab, click on Enable AlwaysOn High Availability Groups option.
    Adding AlwaysOn Availability Group to Existing Failover Cluster
  • Now, click on Start and select Administrative Tools option.
  • Select Server Manager option and click on Features option.
  • From the list of options, check the Failover Clustering option.
    Adding AlwaysOn Availability Group to Existing Failover Cluster
  • Now, in your primary data center, right click Nodes and select Add Node option.
    Adding AlwaysOn Availability Group to Existing Failover Cluster
    Note: Since, we are adding the SA_1 node to the already present WSFC, we need to have our secondary server or the replica in the same active directory.
  • In the Add Node Wizard , enter the name of the Server and the SA_1 in the selected Server box.
    Adding AlwaysOn Availability Group to Existing Failover Cluster
  • Make sure that the SA_1 node is not included in the FCI. For ensuring this, do right click on SQL_PV click Properties and select Preferred Owner option.Make sure that only CL_1 and CL_2 are marked under the Preferred Owner section.
    Adding AlwaysOn Availability Group to Existing Failover Cluster
  • On the cluster instance of SQL_PV, click on SQL Properties . In the Advanced Policies , under the Possible Owners section, only select CL_1 and CL_2 as a pair. In case SA_1 is not removed as the possible owner, error is encountered during th connection establishment.
  • Now, enable the High Availability on the SA_1 node in the secondary data center.
    Adding AlwaysOn Availability Group to Existing Failover Cluster
  • Select Properties option.
  • Under the AlwaysOn High Availability tab, click on Enable AlwaysOn High Availability Groups option.
  • Now, everything is ready for setting up the AG_1 availability group amidst the two data centers.

    Conclusion

    With the help of the two procedures mentioned in the write-up, we believe that the users will be able to add AlwaysOn availability group to an existing failover cluster successfully.

    转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Adding AlwaysOn Availability Group to Existing Failover Cluster

    分享到:更多 ()

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址