Configure SQL Server Always On Availability Group on Linux


This post explains how to create an SQL Server AlwaysOn Availability Group (AG) for high availability on Linux.There are two configuration types for availability groups. High availability configuration uses a cluster manager to provide business continuity. This configuration can also include read-scale replicas.With Read-scale configuration, availability group can be created without a cluster manager for read-scale. The AG for read scale only provides read-only replicas for performance scale-out. It does not provide high availability.

Availability groups under SQL Server on Linux is same as they are on WSFC-based implementations. All the limitations and features are the same, with some exceptions. The main differences include:
  • Microsoft Distributed Transaction Coordinator (DTC) is not supported under Linux in SQL Server 2017 (14.x). Please note that SQL Server 2019 on Linux supports the Microsoft Distributed Transaction Coordinator (MSDTC).
  • Linux-based deployments use Pacemaker instead of a WSFC.
  • Unlike most configurations for AGs on Windows except for the Workgroup Cluster scenario, Pacemaker never requires Active Directory Domain Services (AD DS).
  • How to fail an AG from one node to another is different between Linux and Windows.
  • Certain settings such as required_synchronized_secondaries_to_commit can only be changed via Pacemaker on Linux, whereas a WSFC-based install uses Transact-SQL.


In this demo, 3-servers running CentOS 7 are configured on a VMWare platform. Configuring AlwaysOn Availability Groups AG for high availability requires a cluster manager. A pacemaker with corosync (DBERACLUSTER) is configured to make SQL Server services and its resources highly available. AlwaysOn availability group (AlwaysonLinuxAG) is configured on top of pacemaker achieve high availability for the databases in availability group.

Below table contain details for the host that will be part of AG

Server Name
IP Address
 Node 1
 Node 2
 Node 3
AVG Listener

The steps to create an Availability Group on Linux servers for high availability are different from the steps on a Windows Server failover cluster.The following list describes the high-level steps:
  • Configure a cluster resource manager - Pacemaker. 
  • Install and Configure SQL Server on three cluster servers. 
  • Create the SQL Server 2017 Always On Availability Group 
  • Add the AG as a resource in the cluster.

Refer the link below to configure SQL Server Always On Availability Group on Linux

Note: Perform these steps in order.

SQL Server AlwaysOn Availability Groups on Linux - Part 1

SQL Server AlwaysOn Availability Groups on Linux - Part 2

SQL Server AlwaysOn Availability Groups on Linux - Part 3

SQL Server AlwaysOn Availability Groups on Linux - Part 4

No comments:

Post a Comment