Setting up AlwaysOn High Availability involves setting up…

  1. Windows Failover Cluster via Windows Failover Cluster Manager
  2. SQL Server vis SQL Server Management Studio

Prerequisite

  • Make sure database has a full backup and recovery mode set to Full.
  • Make sure the SQL Server service on each node has the proper permission on the server. (recommend using domain service account on all nodes)
  • Make sure SQL Server is setup for remote login on each note. (enable TCP/IP in network configuration protocol)
  • Make sure AlwaysOn feature is enabled for the SQL Server.
SELECT SERVERPROPERTY ('IsHadrEnabled');  

Steps

Windows Failover Cluster Manager

  • Create new cluster
  • Assign Cluster Name and Cluster IP Address for new cluster
  • Add all servers in group as Nodes

SQL Server Management Studio

  • For each SQL Server Database, enable AlwaysOn Availability Groups by going to… SQL Server Configuration Manager -> Properties of SQL Server -> AlwaysOn High Availability tab -> check “Enable AlwaysOn Availability Groups”.
  • Create new Availability Group (this will auto create Roles in Windows Failover Cluster). One-to-One mapping
  • For each Availability Group, add Replicas, Databases, and Listeners

Note:

  • Windows Failover Cluster must be setup first, then setup the Availability Group.
  • Select “Windows Server Failover Cluster” as the Cluster type.
  • Might be easier to create the Availability Group first, then add the Databases and Listeners. Lastly, add Replicas. Adding Replicas will take the longest because database backup and recovery are performed.
  • Remote desktop on to the primary server in the cluster to configure this.
Last modified: December 7, 2021

Author

Comments

Write a Reply or Comment