You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document Pacemaker HA agent v2 for SQL Server 2025
Revise Pacemaker HA agent documentation for clarity
Updated the documentation for creating availability groups in Pacemaker, including changes to the Pacemaker HA agent v2 and its benefits. Clarified instructions for creating resources and managing upgrades.
Added information about the new Pacemaker HA agent v2 for SQL Server 2025, including its features and usage instructions.
Copy file name to clipboardExpand all lines: docs/linux/sql-server-linux-create-availability-group.md
+45-28Lines changed: 45 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create and Configure an Availability Group for SQL Server on Linux
3
3
description: This tutorial shows how to create and configure availability groups for SQL Server on Linux, as well as create availability group endpoints and certificates.
4
4
author: rwestMSFT
5
5
ms.author: randolphwest
6
-
ms.date: 01/02/2026
6
+
ms.date: 03/19/2026
7
7
ms.service: sql
8
8
ms.subservice: linux
9
9
ms.topic: install-set-up-deploy
@@ -319,7 +319,7 @@ This section shows how to create an AG with a cluster type of External using SSM
319
319
320
320
1. On the Introduction dialog, select **Next**.
321
321
322
-
1. In the Specify Availability Group Options dialog, enter a name for the availability group, and select a cluster type of `EXTERNAL` or `NONE` in the dropdown list. Use `EXTERNAL` when you deploy Pacemaker. Use `NONE` for specialized scenarios, such as read scale-out. Selecting the option for database level health detection is optional. For more information on this option, see [Availability group database level health detection failover option](../database-engine/availability-groups/windows/sql-server-always-on-database-health-detection-failover-option.md). Select **Next**.
322
+
1. In the **Specify Availability Group Options** dialog, enter a name for the AG, and select a cluster type of `EXTERNAL` or `NONE` in the dropdown list. Use `EXTERNAL` when you deploy Pacemaker. Use `NONE` for specialized scenarios, such as read scale-out. Selecting the option for database level health detection is optional. For more information on this option, see [Availability group database level health detection failover option](../database-engine/availability-groups/windows/sql-server-always-on-database-health-detection-failover-option.md). Select **Next**.
323
323
324
324
:::image type="content" source="media/sql-server-linux-create-availability-group/image3.png" alt-text="Screenshot of Create Availability Group showing cluster type." lightbox="media/sql-server-linux-create-availability-group/image3.png":::
325
325
@@ -478,11 +478,11 @@ This example shows three full replicas and how you can configure read-only routi
478
478
479
479
A few things to note about this configuration:
480
480
481
-
-`AGName` is the name of the availability group.
482
-
-`DBName` is the name of the database that you use with the availability group. It can also be a list of names separated by commas.
481
+
-`AGName` is the name of the AG.
482
+
-`DBName` is the name of the database that you use with the AG. It can also be a list of names separated by commas.
483
483
-`ListenerName` is a name that's different from any of the underlying servers or nodes. It's registered in DNS along with `IPAddress`.
484
484
-`IPAddress` is an IP address that's associated with `ListenerName`. It's also unique and not the same as any of the servers or nodes. Applications and end users use either `ListenerName` or `IPAddress` to connect to the AG.
485
-
-`SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
485
+
-`SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
486
486
487
487
1. In a query window connected to the other replica, execute the following statement to join the replica to the AG and initiate the seeding process from the primary to the secondary replica.
488
488
@@ -542,13 +542,13 @@ This example shows the creation of a two-replica configuration using a cluster t
542
542
543
543
In this example:
544
544
545
-
-`AGName` is the name of the availability group.
546
-
-`DBName` is the name of the database that you use with the availability group. It can also be a list of names separated by commas.
545
+
-`AGName` is the name of the AG.
546
+
-`DBName` is the name of the database that you use with the AG. It can also be a list of names separated by commas.
547
547
-`PortOfEndpoint` is the port number used by the endpoint you create.
548
-
-`PortOfInstance` is the port number used by the instance of [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
548
+
-`PortOfInstance` is the port number used by the instance of [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
549
549
-`ListenerName` is a name that's different from any of the underlying replicas but isn't actually used.
550
550
-`PrimaryReplicaIPAddress` is the IP address of the primary replica.
551
-
-`SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
551
+
-`SubnetMask` is the subnet mask of `IPAddress`. In [!INCLUDE [sssql19-md](../includes/sssql19-md.md)] and previous versions, this value is `255.255.255.255`. In [!INCLUDE [sssql22-md](../includes/sssql22-md.md)] and later versions, this value is `0.0.0.0`.
552
552
553
553
1. Join the secondary replica to the AG and initiate automatic seeding.
554
554
@@ -564,12 +564,13 @@ This example shows the creation of a two-replica configuration using a cluster t
564
564
565
565
## Create the SQL Server login and permissions for Pacemaker
566
566
567
-
A Pacemaker high availability cluster that uses [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux needs access to the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] instance, and permissions on the availability group itself. These steps create the login and the associated permissions, along with a file that tells Pacemaker how to log into [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
567
+
A Pacemaker high availability cluster that uses [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux needs access to the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] instance, and permissions on the AG itself. These steps create the login and the associated permissions, along with a file that tells Pacemaker how to log into [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)].
568
568
569
569
1. In a query window connected to the first replica, execute the following script:
570
570
571
571
```sql
572
-
CREATE LOGIN PMLogin WITH PASSWORD ='<password>';
572
+
CREATE LOGIN PMLogin
573
+
WITH PASSWORD ='<password>';
573
574
GO
574
575
575
576
GRANT VIEW SERVER STATE TO PMLogin;
@@ -610,20 +611,48 @@ A Pacemaker high availability cluster that uses [!INCLUDE [ssnoversion-md](../in
610
611
611
612
## Create the availability group resources in the Pacemaker cluster (External only)
612
613
613
-
After you create an availability group in [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)], you must create the corresponding resources in Pacemaker when you specify a cluster type of External. Two resources are associated with an availability group: the availability group itself, and an IP address. Configuring the IP address resource is optional if you aren't using the listener functionality, but it's recommended.
614
+
After you create an AG in [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)], you must create the corresponding resources in Pacemaker when you specify a cluster type of External. Two resources are associated with an AG: the availability group resource, and an IP address resource. Configuring the IP address resource is optional if you aren't using a listener. However, it's recommended when listener functionality is required.
614
615
615
-
The AG resource you create is a type of resource called a *clone*. The AG resource has copies on each node, and one controlling resource called the *master*. The master is associated with the server hosting the primary replica. The other resources host secondary replicas (regular or configuration-only) and can be promoted to master in a failover.
616
+
The AG resource you create is a type of resource called a *clone*. The AG resource has copies on each node, and one controlling resource called the *master*. The *master* is associated with the server hosting the primary replica. The other resources host secondary replicas (regular or configuration-only) and can be promoted to *master* in a failover.
617
+
618
+
### Pacemaker HA agent v2 (preview)
619
+
620
+
In [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] with Cumulative Update (CU) 3 and later versions, a new Pacemaker HA agent v2 (`mssql-server-ha`) is available for Red Hat Enterprise Linux (RHEL) and Ubuntu.
621
+
622
+
Pacemaker HA agent v2 introduces reliability and performance improvements over the previous agent, including:
623
+
624
+
- Significantly improved failover performance to reduce both planned and unplanned failover times.
625
+
- Support for flexible automatic failover policies, including configuration of health-check timeout and failure-condition level.
626
+
- Support for TLS 1.3 for communication between the Pacemaker cluster and SQL Server.
627
+
628
+
Pacemaker HA agent v2 is currently in preview. The existing Pacemaker HA agent (v1) remains fully supported for production deployments.
616
629
617
630
### [Red Hat Enterprise Linux (RHEL) and Ubuntu](#tab/ru)
618
631
619
-
1. Create the AG resource with the following syntax:
632
+
1. Create the AG resource in Pacemaker using the existing Pacemaker HA agent (v1):
In this example, `NameForAGResource` is the unique name you give to this cluster resource for the AG, and `AGName` is the name of the AG that you created.
626
639
640
+
To use Pacemaker HA agent v2, create the AG resource using the `agv2` resource agent:
New deployments on [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] can evaluate Pacemaker HA agent v2. Existing production deployments should upgrade when appropriate.
647
+
648
+
When upgrading to or deploying pacemaker HA agent v2, create the new AG resource using the `agv2` agent instead of the previous ag agent. If an existing AG resource is already configured, remove it and create a new resource using `agv2`:
649
+
650
+
```bash
651
+
sudo pcs resource delete <NameForAGResource>
652
+
```
653
+
654
+
This operation temporarily stops AG synchronization while the resource is being recreated. Deleting and recreating the Pacemaker AG resource doesn't delete the AG. After the resource is recreated, Pacemaker resumes management and AG synchronization automatically.
655
+
627
656
1. Create the IP address resource for the AG that you associate with the listener functionality.
628
657
629
658
```bash
@@ -709,18 +738,6 @@ The AG resource you create is a type of resource called a *clone*. The AG resour
709
738
710
739
---
711
740
712
-
## Next step
713
-
714
-
In this tutorial, you learned how to create and configure an availability group for [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] on Linux. You learned how to:
715
-
716
-
> [!div class="checklist"]
717
-
> - Enable availability groups.
718
-
> - Create AG endpoints and certificates.
719
-
> - Use [!INCLUDE [ssmanstudiofull-md](../includes/ssmanstudiofull-md.md)] (SSMS) or Transact-SQL to create an AG.
720
-
> - Create the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] login and permissions for Pacemaker.
721
-
> - Create AG resources in a Pacemaker cluster.
722
-
723
-
For most AG administration tasks, including upgrades and failing over, see:
741
+
## Related content
724
742
725
-
> [!div class="nextstepaction"]
726
-
> [Always On availability group failover on Linux](sql-server-linux-availability-group-failover-ha.md)
743
+
-[Always On availability group failover on Linux](sql-server-linux-availability-group-failover-ha.md)
0 commit comments