Create Microsoft Cluster Server (MSCS) for SQL Server HA

This procedure describes the different steps to configure a Microsoft Cluster Server (MSCS). MSCS is a critical component for deploying high-availability and replication solutions such as SQL Server Always On Availability Groups (AGs) and Failover Cluster Instances (FCI).

We will make the assumptions below:

  • Three Windows Servers with Standard Edition are installed
    Hostname: SVD-HA1.mydomain.ca, ip: 192.168.100.1
    Hostname: SVD-HA2.mydomain.ca, ip: 192.168.100.2
    Hostname: SVD-HA3.mydomain.ca, ip: 192.168.100.3
  • Similar hardware specs (CPU, RAM) for all nodes for consistent performance
  • A network connection established between the 3 servers with high speed
  • A Windows Cluster named: ClusterAG will be created with these 3 nodes
  • A Windows account with domain admin privileges to install and configure servers or nodes

The Failover Clustering Feature should be installed on the three nodes to be added in the cluster. Repeat all the following steps on each server or node:

From Start menu, launch Server Manager

Click on 2: Add roles and Features

Select Role-based or feature-based installation and click Next

Select the first node listed and click Next

Keep File and Storage Services … selected and click Next

In Select features screen, click to select Failover Clustering. It will pop up a new screen to add features required by failover clustering. Keep box checked and click Add Features

Click Next

Click Install. You can click Yes if you want the server to restart server automatically (recommended)

If you encounter this error below, check and apply below steps to allow WS-Management to accept remote shell requests :

  1. Check Service Windows Remote Management (WinRM) is started
  2. Use gpedit.msc and navigate to  Computer Configuration > Administrative Templates > Windows Components > Windows Remote Shell > Allow remote shell access  to check if Allow Remote Shell Access is set to “Enabled” or “Not configured” to allow access 
  3. Use wf.msc  to check firewall if Windows Remote Management (HTTP-In) is enabled

Check if there is no enterprise gpo which disables this

If this error is fixed, you should see the installation progress. Close when finished

Repeat these above steps on other nodes SVD-HA2 and SVD-HA3.

Once the feature is enabled, we’ll configure failover clustering

Connect on node 1 and launch Server Manager. On the top right menus, click on Tools > Failover Cluster Manager

We need to validate servers’ configuration to check if servers are compliant for cluster configuration or not. This step is very important to be assisted by Microsoft support in case of incident report on cluster configuration.

Click on Validate Configuration …

Click Next

Enter a node name and click Add to add it on Selected servers section

Once all nodes are added, click Next

Select Run only tests I select and click Next

Expand Network

Uncheck Validate Switch enabled … and click Next

Click Next

You can see the validation progress

Check if the validation is passed or fix any issue. Click on Finish

Now we are going to create the cluster:

Open again Failover Cluster Manager console from Start menu and click on Create Cluster …

Click Next

Enter only node 1 SVD-HA1 and click Next. We’ll add other nodes later

Select No… and click Next

Enter the cluster Name: ClusterAG and cluster (ex IP: 192.168.240.1) and Next

Click Next

Check cluster creation Summary and click Finish

Check the cluster created named: ClusterAG.mydomain.ca is visible in the top left of Failover Cluster Manager console. NB:This cluster object ClusterAG is created in Computers folder in Active Directory

Enter the name of the other nodes: SVD-HA2 et SVD-HA3 and Add. Click Next

Uncheck Add all eligible storage to the cluster. We are not creating storage to be shared by the nodes. But this is required for SQL Server Failover Cluster configuration. Click Next

Check nodes to be added in Summary screen and click Finish

In Nodes menu, you can see all available nodes added in the cluster and their status is Up.

This concludes the creation of the cluster ClusterAG within 3 nodes. We are now ready to configure SQL Server High Availability features:

  • For Always On Availability Groups: databases are stored locally on each node
  • For Failover Cluster: we need to configure and share storage in the cluster. These storages will be only available on the node made primary or active

Here are some prerequisites to be configured by Windows System Administrators, to prevent some common issues when configuring Always On Availability Groups (AG) or Failover Cluster Instance (FCI)
 
Required Permissions in Active Directory
For Both FCI and AG

1.CNO (Cluster Name Object) Must Have:

  • Create Computer Objects permission in the target Organizational Unit (OU).
  • Read/Write permissions for its own AD object.

2.Cluster Nodes (Server Computer Accounts) Must Have:

  • Join Computers to the Domain (if not already joined).
  • Read access to the OU where CNO/VCOs reside.

3.SQL Service Account (If Used):

  • Must have Full Control on shared storage (for FCI).
  • Must have Register SPNs permissions (for AG Listener).

Additional for Always On AG (Listener)

1. If Automatic AG Listener Creation:

  • CNO must have Create Computer Objects for the AG Listener VCO.

2. If Manual AG Listener Creation:

  • Pre-stage a disabled computer object in AD and grant CNO, Full Control

➡ Ensure CNO has Create Computer Objects rights in the target OU.

➡ Grant the SQL service account Register SPN permissions.

➡ Manually create the AG Listener computer object in AD and grant CNO, Full Control