How to build a multi-domain cluster with AlwaysOn availability groups - SQL Server 2016
SQL Server 2016 is making lots of news, and promises to be a revolutionary SQL Server version. In talking about AlwaysOn Availability Groups, a very good number of improvements were already announced as part of the Basic Availability Groups. By the way, Hemantgiri, my friend and former Data Platform MVP, already talked about this on his post. One of the improvements that got my attention was the ability to set up the AlwaysOn Availability Groups sit in a multi-domain cluster, or even a domain-detached cluster. I tested both and indeed this works very well, but the maintenance is slightly different (read: more difficult). We need to consider the following points:
- The cluster manager is not supporting this, everything should be done by using PowerShell.
- To perform the setup, you need to be connected as a local Administrator.
- The “Administrator” user password should be the same on all involved nodes.
- For some tasks, like SQL Server upgrade/update, you will need to run the setup using the local administrator account.
- You don’t need use the Administrator account to log in. Use your regular account, select the Run as different user menu item, and press the SHIFT key while you right-click the file.
- You must be using Windows Server 2016 and SQL Server 2016.
For Domain-detached clusterIn this particular case, the Failover Cluster is created without any associated computer objects, and for this reason, each involved node needs to have a defined primary DNS suffix.
For Multi-domain clusterMake sure that you can reach all the nodes, using IP, server name, and FQDN. Take care with firewall rules as this may influence the cluster creation. Make sure that the trust relationship between the domains is well defined.
Creating the clusterIn my case, I created a multi-domain cluster, which was also a multi subnet one. The following command is the base to create the cluster: New-Cluster –Name <Cluster Name> -Node <Nodes to Cluster> -StaticAddress <Cluster IP> -AdministrativeAccessPoint DNS The catch here is the -AdministrativeAccessPoint DNS. Check the PowerShell New-Cluster command for more options. To perform this command, open the PowerShell console as Administrator (you can either log in as local Administrator or open the console using the method that I explained earlier in this article), and execute the command. That’s it! In my test laboratory, I created a cluster containing three nodes:
- SQLCAFE.local (184.108.40.206)
- LISBON.local (220.127.116.11)
- SQLCAFE.local (18.104.22.168)
- Get-ClusterGroup <Group Name> | Get-ClusterResource