Steps for Installing SQL Server AlwaysOn Availability Groups
Prerequisites
Windows
- Do not install AlwaysOn on a domain controller
- The operating system must be Windows 2012 or later
- Install all available Windows hotfixes on every server (replica)
- Windows Server Failover Cluster (WSFC) must be installed on every replica
SQL Server
- Each server (replica) must be a node in the WSFC
- No replica can run Active Directory services
- Each replica must run on comparable hardware that can handle identical workloads
- Each instance must run the same version of SQL Server, and have the same SQL Server collation
- The account that runs SQL Services should be a domain account
Network
- It is recommended to use the same network links for communication between WSFC nodes and AlwaysOn replicas
Databases in the AG
- user databases (no system databases)
- read/write
- multi-user
- AUTO_CLOSE disabled
- full recovery mode
- not configured for database mirroring
Steps
The following steps need to be performed in this order:
- Add Windows Failover Clustering (WSFC) to each replica (server)
- Configure WSFC on your primary replica
- Configure SQL Server on each replica
- Configure Logins & Replicas
- Install AlwaysOn
Sources:
https://www.sqlrx.com/steps-for-installing-sql-server-alwayson-availability-groups/
https://www.sqlservercentral.com/articles/steps-for-installing-alwayson-availability-groups-sql-2019