Tutorial: Set up a three node Always On availability group with DH2i DxEnterprise

Applies to: SQL Server on Azure VM

This tutorial explains how to configure an SQL Server Always On availability group with DH2i DxEnterprise running on Linux-based Azure Virtual Machines (VMs).

For more information about DxEnterprise, see DH2i DxEnterprise.

Note

Microsoft supports data movement, availability groups, and the SQL Server components. Contact DH2i for support related to the documentation of DH2i DxEnterprise cluster, for the cluster and quorum management.

In this tutorial, you'll set up a DxEnterprise cluster using DxAdmin Client UI. Optionally, you can also set up the cluster using the DxCLI command-line interface. For this example, we've used four VMs. Three of those VMs are running Ubuntu 18.04, and are part of the three node cluster. The fourth VM is running Windows 10 with the DxAdmin tool to manage and configure the cluster.

This tutorial consists of the following steps:

  • Install SQL Server on all virtual machines that will be part of the availability group.
  • Install DxEnterprise on all the virtual machines and configure the DxEnterprise cluster.
  • Create the virtual hosts to provide failover support and high availability and add an availability group and database to the availability group.
  • Create the internal Azure Load Balancer for availability group listener (optional).
  • Perform a manual or automatic failover.

Prerequisites

Install SQL Server on Azure VMs in the availability group

In this tutorial, you create a three node Linux-based cluster running the availability group. Follow the documentation for SQL Server installation on Linux based on the choice of your Linux platform. We also recommend you install the SQL Server tools for this tutorial.

Note

Ensure that the Linux OS that you choose is a common distribution that is supported by both DH2i DxEnterprise, Minimal System Requirements and Microsoft SQL Server.

This tutorial uses Ubuntu 18.04, which is supported by both DH2i DxEnterprise and Microsoft SQL Server.

For this tutorial, don't install SQL Server on the Windows VM, because this node isn't going to be part of the cluster, and is used only to manage the cluster using DxAdmin.

After you complete this step, you should have SQL Server and SQL Server tools (optionally) installed on all three Linux-based VMs that participate in the availability group.  

Install DxEnterprise on VMs and Configure the cluster

In this step, install DH2i DxEnterprise for Linux on the three Linux VMs. The following table describes the role each server plays in the cluster:

Number of VMs DH2i DxEnterprise role Microsoft SQL Server availability group replica role
1 Cluster node - Linux based Primary
1 Cluster node - Linux based Secondary - Synchronous commit
1 Cluster node - Linux based Secondary - Synchronous commit
1 DxAdmin Client NA

To install DxEnterprise on the three Linux-based nodes, follow the DH2i DxEnterprise documentation based on the Linux operating system you choose. Install DxEnterprise using any one of the methods listed below.

To install just the DxAdmin client tool on the Windows VM, follow DxAdmin Client UI Quick Start Guide.

After this step, you should have the DxEnterprise cluster created on the Linux VMs, and DxAdmin client installed on the Windows Client machine.

Note

You can also create a three node cluster where one of the node is added as configuration-only mode to enable automatic failover. For more information, see Supported Availability Modes.

Create the virtual hosts for failover support and high availability

In this step, you create a virtual host, availability group, and then add a database, all using the DxAdmin UI.

Note

During this step, the SQL Server instances are restarted to enable availability groups.

Connect to the Windows client machine running DxAdmin to connect to the cluster created in the step above. Follow the steps documented at MSSQL Availability Groups with DxAdmin to enable Always On and create the virtual host and availability group.

Tip

Before adding the databases, ensure the database is created and backed up on the primary instance of SQL Server.

Create the internal Azure Load Balancer for listener (optional)

In this optional step, you can create and configure the Azure Load balancer that holds the IP addresses for the availability group listeners. For more information on Load Balancer, see Azure Load Balancer. To configure the Load Balancer and availability group listener using DxAdmin, see Azure Load Balancer Quick Start Guide.

After this step, you should have an availability group listener created and mapped to the internal load balancer.

Test manual or automatic failover

For the automatic failover test, bring down the primary replica by turning off the virtual machine from the Azure portal. This test replicates the sudden unavailability of the primary node. The expected behavior is:

  • The cluster manager promotes one of the secondary replicas in the availability group to primary.
  • The failed primary replica automatically joins the cluster after comes back up. The cluster manager promotes it to secondary replica.

You could also perform a manual failover by following the following steps:

  1. Connect to the cluster by using DxAdmin.
  2. Expand the virtual host for the availability group.
  3. Right-click on the target node/secondary replica and select Start Hosting on Member to initiate the failover.

For more information on more operations within DxEnterprise, See DxEnterprise Admin Guide and DxEnterprise DxCLI Guide.

Next Steps