I’ve written a few posts recently around Clustering. Most of thse have been inspired by working on building out 4 new clusters consisting of 16 nodes and 14 new SQL instances. Each of the servers in the clusters are identical and each one of the SQL installs needed to be exactly the same.
Ensuring that all the installs are the same can be challenging when using the GUI, especially when you have you are installing a lot of instances. In this case:
- Cluster A – 5 nodes x 4 SQL instances = 20 installs
- Cluster B – 4 nodes x 3 SQL instances = 12 installs
- Cluster C – 4 nodes x 4 SQL instances = 16 installs
- Cluster D – 3 nodes x 3 SQL instances = 9 installs
- Total installs: 57
Given how slow it is to use the SQL installer GUI I figured it would take me about 2 1/2 lifetimes to perform the installs I needed.
A better and more consistent way to install SQL
So what would be a better way to perform these installs? It makes sense to perform automated installs using ini files that hold all the configuration information for the instance.
There’s a good MSDN article on “How to: Install SQL Server 2008 R2 Using a Configuration File”.
Using the SQL Server instance prep tool is again a major undertaking using the GUI. I figured that there had to be a better and faster way to build an ini file to perform the installs I needed. From previous cluster installs I had a couple of configuration.ini files laying around, it’s a pretty easy task to manipulate those to reference new clusters/disks and IP addresses. Thing is that it’s not particularly quick and also very prone to error.
So what would be a better way?
PowerShell to the rescue
Yet again, PowerShell is the savior in this situation.
I put together a script that is quick and lightweight, asks the relevant questions and provides you with the ini files that you need to install a new clustered SQL Server instance and the ini files that you need to perform the installs on the additional cluster nodes.
First things first
Before using the script we need to ensure the cluster is setup and ready to go. Here I’ll be using my home machine to install a new clustered SQL Server instance.
I’ve created a new cluster called CLUSTER1 consisting of two nodes CLUSTERNODEA and CLUSTERNODEB which consists of a private and public network (named as such).
The cluster had node and disk majority. Storage wise (as this is a demo) I’ve only got a couple of disks. SQL Data Disk to hold my SQL system, data and log files plus SQL Backup Disk to hold the backups. This is obviously not how I would setup a normal system, this is just iSCSI disk running on my laptop, don’t judge me too harshly.
In part 2 I’ll go over the configured Active Directory components so that everything is in place ready for the install to happen.