I had to set a high availability Microsoft SQL Server in a WORKGROUP environment. Since Microsoft SQL Server 2017 the Always On feature is available (for only one database with a MSSQL Standard licencing). And since Windows 2016 Server Standard High Availability cluster is possible in a WORKGROUP environment.
net user mssqlservice MyPassw0rdMSSQL! /add /expires:never
WMIC USERACCOUNT WHERE Name='mssqlservice' SET PasswordExpires=FALSE
net localgroup administrators mssqlservice /add
Note : We have to open the TCP 1433 and 5022 on each server.
PS C:\Windows\system32> netsh advfirewall firewall add rule name="MSSQL" dir=in localport=1433,5022 remoteport=0-65535 protocol=TCP action=allow remoteip=any localip=any
PS > New-NetFirewallRule -DisplayName "MSSQL" -Direction Inbound -LocalAddress Any -RemoteAddress Any -Protocol tcp -LocalPort 1433,5022 -Action Allow
192.168.1.196 mssql01 192.168.1.196 mssql01.priv 192.168.1.197 mssql02 192.168.1.197 mssql02.priv 192.168.1.198 wfc_mssql 192.168.1.198 wfc_mssql.priv 192.168.1.199 ha_mssql 192.168.1.199 ha_mssql.priv
Install the Windows Failover Clustering role.
Install-WindowsFeature -Name Failover-Clustering –IncludeManagementTools -Restart
Configure the Windows Failover Clustering role.
New-Cluster -Name WFC_MSSQL -Node mssql01.priv, mssql02.priv -AdministrativeAccessPoint DNS -StaticAddress 192.168.1.198
In Microsoft SQL Server we need to enable the AlwaysOn Availability feature.
Download and Install Microsoft SQL Server Management Studio wherever you want
Contact :