In this series, I will demonstrate how to install a SQL Server 2012 clustered instance in a cluster of two nodes. In general, the installation will be done in two parts:
New instance installation in one of the nodes.
Add the other node to the existing clustered instance.
For a cluster with more than two nodes, we would need to perform the first step in one of the nodes, and repeat the second step on all other nodes. What is a clustered instance? Basically, a clustered instance is a SQL Server instance installed over a Windows Failover Cluster (WFC) service. The main purpose of a WFC solution is protect our systems from hardware failures. In a scenario of a cluster with two nodes, we are talking about two servers, with similar hardware configuration, connected by a Failover Cluster service. Having one SQL Server instance installed over this solution, we can call this instance as a clustered instance. That clustered instance must be active in only one of the available nodes, and this means that the other nodes will be in IDLE mode, with no active functions. Another important point is that the WFC accepts shared storage, which means that we need a SAN to store the database files (logs and data). However, the SQL Server binaries generated by the installation should be in a local disk. Other than shared storage, we also have an option to store our database files into a SMB Fileshare, which is cheaper, but not as good as a solution using SAN. From SQL Server 2012 we have an option to store the TempDB isolated in a local disk, which brings lots of benefits. This way, the WFC is a high availability solution and not a load balancing or a disaster recovery solution. We can reach this by having an AlwaysOn configuration, available from SQL Server 2012. Assumption I’m assuming that at this point we already have a built cluster solution with two or more nodes. Normally, the DBA receives the environment ready to install the clustered instance. The WFC build is usually made by the System Administrators. However, I’m planning on doing another article explaining how to configure a WFC solution. Stay tuned! Prerequisites Before we start the installation, we need to assure that we have the following items ready to be used:
A virtual hostname. In our example we will use “SQL04”.
A virtual IP, a.k.a vIP. We will use: 192.168.123.124.
Available shared storage. The best practice is have, at least, one for Data files (mdf and ldf), one for Log files (ldf) and one for Tempdb files. On this guide I will use one disk for everything, to simplify, but this is a bad approach!
Service Accounts: One for SQL Server Engine and another for SQL Server Agent (this is the best practice). We will use the following accounts: SSLAB\SVCSQLSRVENG and SSLAB\SVCSQLAGT.
Notice that the service accounts are domain accounts. We have no other choice, to build a cluster we need to be part of a domain!
Our Environment On this step-by-step guide, we will use the following environment – based in virtual machines:
Windows Server 2012 R2 nodes:
W2012SRV03 – 192.168.123.205
W2012SRV04 – 192.168.123.206
The both nodes are part of the following cluster:
W2012CLT02 – 192.168.123.111
As this is a lab, I’m using a Synology Diskstation as my SAN. Just for information, the IP is: 192.168.123.103.
For SQL Server:
vHostname – SQL04
vIP – 192.168.123.124
Version: Microsoft SQL Server 2012 (SP1) – 11.0.3128.0 (X64) – Enterprise Edition
Installation Permissions for the used login To install the SQL Server I’m using the domain login called “SSLAB\dba”, which is part of the Administrators group on W2012SRV03 and W2012SRV04. The login “SSLAB\dba” is a simple user into the domain, without special permissions.
The objective of this second blog post in my series of three is to demonstrate how to install the first node of a clustered SQL Server 2012 instance and how to basically manage it from the Failover Cluster Manager tool, on Windows Server 2012 R2.
Just to refresh our memory, this is our infrastructure:
For more details about the prerequisites and a general explanation, check out Part 1 of this series.
The installation: Starting from the very first node
So let’s start the installation. If you remember, I mentioned that we have two steps to complete the installation on both nodes. For now we will start doing the new instance installation in one of the nodes. This node will be W2012SRV03.
With the SQL Server installation binaries available, click “Setup”:
Finally, we have all the setup files installed. Another check will run in order to validate if problems might occur when SQL Server files is installed.
It’s recommended to have a clustered MS DTC resource, as well as a dedicated MS DTC resource dedicated to each SQL Server group.
Here is a link to a good resource about this theme:http://blogs.msdn.com/b/cindygross/archive/2009/02/22/how-to-configure-dtc-for-sql-server-in-a-windows-2008-cluster.aspx