Skip to content

Setting up a SQL Server AlwaysOn Availability Groups

dscbot edited this page Oct 29, 2024 · 1 revision

This will reference examples that show how to setup high availability using AlwaysOn Availability Group. It assumes that a working domain exists with at least one Domain Controller, and both servers that should contain the SQL Server nodes are domain joined.

Prepare Active Directory

Please see Prepare Active Directory. The same applies to the failover cluster needed for SQL Server AlwaysOn Availability Groups.

Create Failover Cluster

Please see Create Failover Cluster. The same applies to the failover cluster needed for SQL Server AlwaysOn Availability Groups.

Install SQL Server on replicas

Note

Make sure any user accounts you use in the configuration exist in Active Directory and that they have the correct permission.

Install SQL Server on the primary node

The example shows how to install a SQL Server named instance on a single server which will be used as the primary replica node in the SQL Server AlwaysOn Availability Group.

Install SQL Server on the secondary node

The example shows how to install a SQL Server named instance on a single server which will be used as the secondary replica node in the SQL Server AlwaysOn Availability Group.

Enable AlwaysOn on both primary and secondary replica

AlwaysOn must be enabled on both the primary and secondary replica, and the example Enable AlwaysOn shows how to enable it (which requires that a working Failover Cluster is present on the node).

Configure SQL Server AlwaysOn Availability Group

Once AlwaysOn is enabled we can create the Availability Group. The example Create Availability Group shows how to create the Availability Group on the primary replica and join the Availability Group on the secondary replica.

Important

Make sure any user accounts you use in the configuration exist in Active Directory and that they have the correct permission.

Home

Commands

Resources

Usage

Clone this wiki locally