Configure SQL Always On

Here’s a clean, end-to-end walkthrough to stand up SQL Server Always On Availability Group (AG) on Windows (WSFC). This assumes 2–3 replicas, one AG listener, and synchronous commit + automatic failover between two primaries.

Prerequisites

  1. Environment

  2. Windows Firewall

  3. Databases to replicate

  4. Witness (for quorum)

Build the Windows Failover Cluster (WSFC)

On any node:

  1. Open Server Manager > Tools > Failover Cluster Manager.

  2. Validate Configuration… > add all replica servers > run all tests > ensure no critical failures.

  3. Create Cluster…

  4. Add a Witness:

Enable “Always On” at the SQL Service level (each replica)

On each SQL Server:

  1. Open SQL Server Configuration Manager.

  2. SQL Server Services → right-click your instance → PropertiesAlways On High Availability tab.

  3. Check Enable Always On Availability Groups (cluster must be healthy).

  4. OK, then Restart the SQL Server service.

Create the Availability Group in SSMS (on the future primary)

  1. Connect in SQL Server Management Studio (SSMS) to the node you want as the primary.

  2. Expand the instance > Always On High Availability > Availability Groups > New Availability Group Wizard…

3A. Specify AG name & databases

3B. Specify Replicas

3C. Endpoints & Backups

3D. Listener (virtual name for apps)

Azure note (if replicas are in Azure VMs): the listener needs a Load Balancer with a health probe + HA ports or specific rule; associate the LB frontend IP with the listener name. (Do this in Azure first; then, in the wizard, choose that static IP.)

3E. Data Synchronization

Choose one:

3F. Validation & Create

Join & verify (secondaries)

If you used Automatic Seeding or Full method, replicas will auto-join. Otherwise:

  1. On each secondary in SSMS:

  2. Watch AG Dashboard:

Test a planned failover

  1. In SSMS AG Dashboard, right-click the primary replica > Failover…

  2. Next > choose a synchronous replica with Automatic Failover > Connect > Finish.

  3. Confirm apps can connect via the Listener and the new primary accepts writes.

Post-build housekeeping

  1. Jobs, Logins, Linked Servers

  2. Backup jobs

  3. Read-only routing (optional via T-SQL; minimal GUI support)

  4. Monitoring

Quick Checklist (TL;DR)

Note: Things to know