0

Ansible for SQL Server DBAs. Available Now!

Header Logo
Blog DBA Challenges
Courses
Automated Sandbox Framework Ansible for SQL Server DBAs: Level 1
Log In
← Back to all posts
Connect
Share to…
Share

#011 Adding a Second Node to Your SQL Server 2022 FCI

by Luke Campbell
Oct 26, 2024

Last week, you prestaged the SQL Server Network Virtual Computer Object (VCO) and installed SQL Server 2022 on the first cluster node.  But you couldn't connect remotely and needed to add the second node.

We'll address both of these issues in this week's challenge.  By the end, you'll have a fully functional failover cluster instance.

This challenge has three objectives.

  1. Install SQL Server 2022 Developer Edition on the second node.
  2. Configure Windows Firewall rules using PowerShell for SQL Server.
  3. Verify remote connectivity to the SQL Server instance.

Ready?


Estimated time to complete: Less than 1 hour.


Step 1: Add the Second Node to the SQL Server FCI

  1. Start the SQL Server Installation on CLUSTER1SRV2.
  2. In the SQL Server Installation Center, click Installation, then choose Add node to a SQL Server failover cluster.  Click next until you get to the rule check.
  3. Review and address any errors presented in the rule check.  If all is well, click next.
  4. Review the Cluster Node Configuration, then click next.
  5. Review the Cluster Network Configuration, then click next. 
  6. Set the passwords for the engine and agent services and check the box next to "Grant Perform Volume Maintenance Tasks privilege to SQL Server Database Engine service."  Click Next.
  7. Click Install.

Wait until the installation is completed.  You'll notice the install on the second node completes much faster than the install on the first node.

Step 2: Configure the Windows Firewall Rules using PowerShell

Now, you're ready to allow access to the SQL Server instance.  You'll need to add a firewall rule on both nodes.  You can do that in several different ways: explicitly allowing inbound connections to the default SQL Server port (TCP 1433) or by allowing access to the SQL Server executable.  Let's take the first approach.

  1. Open PowerShell as Administrator on both CLUSTER1SRV1 and CLUSTER1SRV2.
  2. Run New-NetFirewallRule -DisplayName "Allow SQL Server Inbound" -Direction Inbound -Protocol TCP -LocalPort 1433 -Action Allow
  3. Review the output and ensure you see the status "The rule was parsed successfully from the store."

Don't forget to run this command on both cluster nodes.

Step 3: Verify Remote Connectivity to the SQL Server Instance

Now that the second node is added and firewall rules are configured test remote connectivity.  

  1. Install SQL Server Management Studio (SSMS).  If not installed, download and install SSMS on a client machine (e.g., SRV1 from the 001 challenge).
  2. Test Connectivity.  Open SSMS.  In the server name field, enter the SQL Server Network Name (SQLCLUSTER1).  Choose optional from the Encryption drop-down menu.
  3. If you cannot connect, check the following: Firewall Settings and SQL Server Network Configuration Manager (verify that TCP/IP protocol is enabled).  Cluster Status (ensure that the SQL Server role is running and online in Failover Cluster Manager).

Now, you'll test failover.

  1. Open Failover Cluster Manager on one of the cluster nodes.
  2. Right-click on the SQL Server role and select Move > Select Node.
  3. Choose the other node and click OK.
  4. Verify that the role moves successfully and you can still connect via SSMS.

 

Helping Others and Sharing Your Results

Congratulations on successfully adding the second node to your SQL Server 2022 FCI and configuring firewall rules using PowerShell!  Now would be a good time to patch SQL Server on both nodes by applying the latest updates.

Spend time exploring the cluster, practicing failover, and familiarizing yourself with the firewall configurations.  Understanding how these components interact is crucial for managing a production environment.  

If you have tips or experiences to share, please post them in the comments or tag me on LinkedIn with the #dbachallenges hashtag.  

While you're there, I've created a poll regarding how valuable Communities are when combined with a course.  Would you mind voting?

Poll: Do you find online communities valuable when learning something new? 

Feedback

If there's a DBA Challenge you'd like to see, let me know by replying to this email.  

P.S. If you're interested in automating tasks such as building and configuring new SQL Server instances, I cover five key problems Ansible helps to solve in the video below (along with the final solution we build in the Ansible for SQL Server DBAs course).

Behind the Scenes - Week 9 

Feel free to reply to this email with any thoughts or questions.

Good luck, and I look forward to seeing your results!

Luke

Responses

Join the conversation
t("newsletters.loading")
Loading...
#016 Leveraging Ansible Variables to Configure Lock Pages in Memory
You've probably seen it happen.  During peak load on a SQL Server instance, the operating system occasionally pages out parts of SQL Server's memory to disk, causing performance slowdowns.  And you've probably read how Lock Pages in Memory can help address this issue.   Granting this user right can be time-consuming and error-prone when done manually especially if you need to grant the permissi...
#015 Introduction to the Automated Sandbox Framework
2025 is just around the corner, and it's shaping up to be an exciting year for DBAs.  With Windows Server 2025 already here and SQL Server 2025 on the horizon, there's no better time to sharpen your skills and prepare for what's ahead. This year, I've focused on solving a common challenge for DBAs: how to quickly and consistently build test environments for learning and experimentation. In mid-...
#014 Introduction to the Enterprise Policy-Based Management Framework
It's been a few weeks since the last edition.  Life happens--between releasing Ansible for SQL Server DBAs, celebrating Thanksgiving, preparing for Christmas, and juggling the day-to-day demands of being a full-time consultant, it's easy to feel stretched thin.  Have you ever felt that way? But here's a question:  Are we just staying busy or moving toward our goals (we like to think so)?  Are o...

DBA Challenges

Helping you become a more efficient SQL Server Database Administrator through real-world challenges and automation.
Footer Logo
Policies Contact
© 2025 AUTOMATESQL LLC

Five Steps to Spot Automation Opportunities

Wondering if that task you're working on should be automated?  With your free Time Tracker Excel workbook, you're able to easily track and analyze how you spend your time throughout the day.

 

When you signup, we'll send you periodic emails with additional free content. Unsubscribe anytime.