Saturday, January 17, 2015

Setting up a SQL Server 2014 AlwaysOn Availability Group

I recently had a requirement to set up a SQL Server 2014 AlwaysOn Availability Group for a customer and so I decided to follow this article since it says "Step-By-Step":

http://blogs.technet.com/b/canitpro/archive/2013/08/20/step-by-step-creating-a-sql-server-2012-alwayson-availability-group.aspx

Unfortunately, it leaves out a lot of steps!!

Therefore, I encountered numerous error messages throughout the entire installation process which required reading through numerous other articles.  One of the biggest roadblocks to beginning the installation was missing a comprehensive set of system requirements/prerequisites before getting started with the configuration.

Here is a list of some of the requirements before getting started with SQL AlwaysOn High Availability:

  1. 2 SQL Server Enterprise edition installations
  2. 2 identical Windows Servers running Windows Server 2012 or preferably Windows Server 2012 R2
  3. 1 or more Windows Servers to host your Windows File Shares needed for SQL AlwaysOn HA
  4. 4 available IP Addresses (2 for each SQL Server installation, 1 to host the Windows Failover Cluster and 1 for the SQL Server Availability Group Listener). 
  5. 2 File Shares hosted on computers other than the 2 SQL Server installations.  (1 to host the Windows Failover Cluster Share and 1 to host the SQL Server HA File Share)
  6. Running the SQL Server Service Accounts using a Domain account rather than the standard MSSQL account.
  7. Permissions on Active Directory to create Computer objects.
  8. Turning on the Remote Registry service on both computers
  9. Turning off the Windows Firewall or making exceptions for the Remote Registry/Remote Administration service to be allowed so that both computers on the Windows Failover Cluster can communicate with each other.   
  10. Make sure that all of your databases are in Full Recovery mode and have had recent backups before they can be added to the AlwaysOn configuration.
One of the first error messages that I encountered while setting up SQL AlwaysOn was the error outlined in this article: http://askadba.blogspot.com/2012/08/quorum-error-when-creating-alwayson.html

This required me to turn off the AlwaysOn setting in SQL Server for both servers and then re-enable them.

The next issue that I encountered prevented me from connecting to the file share and threw a Remote Registry error.

This required me to turn on the Remote Registry service and turn off the Windows Firewall.

The next error indicated that I did not have Administrative privileges on the cluster: http://www.powershell.co.uk/you-do-not-have-administrative-privileges-on-the-cluster/

The next error indicated that I had to remove any local groups from the cluster privileges: http://technet.microsoft.com/en-us/library/cc959947.aspx

This required me to grant Full Control privileges in the Cluster Properties and remove all local users and groups.

The next problem I encountered was a problem with configuring the File Share Witness: http://www.dbaglobe.com/2014/07/fix-issue-when-configuring-file-share.html

This required me to ensure that I had sufficient security privileges on the File Share from both servers.

The final problem indicated that I could not create the Cluster group listener: http://blogs.msdn.com/b/alwaysonpro/archive/2014/03/25/create-listener-fails-with-message-the-wsfc-cluster-could-not-bring-the-network-name-resource-online.aspx

I had to change the permissions in Active Directory and make sure that I had a 4th IP Address available to assign to the Cluster Group Listener.

No comments:

Post a Comment