Step-by-Step Guide for Implementing SQL
Cluster in a Greenfield Environment
📝 Prerequisites
Before we start, ensure you have:
• At least 6 Servers:
• 2 Domain Controllers (DC1 & DC2)
• 4 SQL Nodes (Node1, Node2, Node3, Node4)
• Storage:
• Shared storage (SAN or Storage Spaces Direct) for clustering.
• Windows Server Installation Media
• SQL Server Installation Media
Step 1: Set Up Active Directory Forest & Domain Controllers
1.1 Install Windows Server on DC1 & DC2
1. Install Windows Server on DC1 & DC2.
2. Configure Static IPs.
1.2 Promote DC1 to Domain Controller
1. Open Server Manager → Add Active Directory Domain Services.
2. Click Promote this server to a domain controller.
3. Choose Create a new forest.
4. Set Root Domain Name (e.g., contoso.com).
5. Configure Domain Functional Level (Windows Server 2019/2022).
6. Set DNS & NetBIOS name.
7. Restart the server.
1.3 Promote DC2 as Additional Domain Controller
1. Join DC2 to the contoso.com domain.
2. Open Server Manager → Add Active Directory Domain Services.
3. Choose Add a domain controller to an existing domain.
4. Replicate from DC1.
5. Restart the server.
Step 2: Configure Network & Join SQL Nodes to the Domain
2.1 Configure Static IPs
Set static IPs for all nodes:
• DC1: 10.0.0.1
• DC2: 10.0.0.2
• Node1: 10.0.0.10
• Node2: 10.0.0.11
• Node3: 10.0.0.12
• Node4: 10.0.0.13
2.2 Join Nodes to the Domain
On each SQL node (Node1, Node2, Node3, Node4):
1. Open System Properties (sysdm.cpl).
2. Click Change → Enter domain name (contoso.com).
3. Restart the server.
Step 3: Configure Storage for Clustering
1. Set Up Shared Storage (SAN)
• Provision storage for:
• Quorum Disk (Witness)
• Database Data Files
• Log Files
2. Open Disk Management on Node1.
3. Format the disks as NTFS.
4. Assign drive letters (Q:, D:, L:).
5. Repeat on other nodes.
Step 4: Install Failover Clustering on SQL Nodes
4.1 Install Failover Clustering Feature
On all 4 nodes, run:
Install-WindowsFeature -Name Failover-Clustering -
IncludeManagementTools
Restart all nodes.
4.2 Validate Cluster Configuration
On Node1:
1. Open Failover Cluster Manager.
2. Click Validate Configuration.
3. Add Node1 & Node2 (for Cluster1), Node3 & Node4 (for Cluster2).
4. Run Validation Tests (Fix issues if any).
4.3 Create Failover Clusters
Cluster 1 (SQLCLUSTER1)
1. Open Failover Cluster Manager.
2. Click Create Cluster.
3. Add Node1 & Node2.
4. Assign:
• Cluster Name: SQLCLUSTER1
• Cluster IP: 10.0.0.20
5. Configure Quorum Witness.
6. Finish and validate.
Cluster 2 (SQLCLUSTER2)
Repeat the same process with:
• Nodes: Node3 & Node4.
• Cluster Name: SQLCLUSTER2.
• Cluster IP: 10.0.0.30.
Step 5: Install SQL Server on Each Cluster
5.1 Install SQL Server on First Cluster
On Node1:
1. Mount SQL Server ISO.
2. Run setup.exe.
3. Choose New SQL Server failover cluster installation.
4. Configure:
• SQL Network Name: SQLFCI1
• IP Address: 10.0.0.21
• Storage: Select shared disks.
5. Install SQL.
On Node2:
1. Run SQL Setup.
2. Choose Add node to a SQL Server failover cluster.
3. Complete setup.
5.2 Install SQL Server on Second Cluster
Repeat on Node3:
• SQL Cluster Name: SQLFCI2
• SQL IP Address: 10.0.0.31
Then add Node4 as a second node.
Step 6: Configure & Test SQL Failover Clusters
6.1 Verify SQL Cluster
1. Open Failover Cluster Manager.
2. Expand Roles.
3. Validate SQL Server roles.
6.2 Test Failover
1. Move SQL instance between nodes.
2. Check database accessibility.
6.3 Configure SQL Server
1. Open SSMS.
2. Connect to SQLFCI1 and SQLFCI2.
3. Configure:
• Authentication (Mixed Mode).
• File paths.
• Maintenance plans.
Step 7: Final Testing & Backup
1. Failover Test: Manually switch nodes.
2. Performance Test: Run SQL queries.
3. Backup & DR Plan:
• Configure backups.
• Document recovery steps.