Installing SQL Server 2008/2008R2 Failover Cluster- Part2

In the previous post InstallCluster Part-1 I’ve discussed about what are required prerequisites and few best practices. Assuming you’ve downloaded all the required software’s and Operating System ISO(x86 or x64 depending on your CPU), let’s continue to install windows Server 2008 VM(s).
Let’s install three VM’s in this 2nd part of series to prepare our LAB environment.
Step1: Install VMWare workstation on your PC/Laptop. Once installed successfully, we can create as many virtual machines as needed. In this Series, we’ll be installing 3 VM’s with Windows Sever 2008 enterprise edition.
VM1 – Domain Controller and my Server to hold SAN(Software based). Let’s call it as “SANDC”.
VM2 – Server 1 participating in our Cluster. Let’s call it as “NODE1”.
VM3 – Server 2 participating in our Cluster. Let’s call it as “NODE2”.

You can create a new VM by choosing either of the options as shown below.

Choose Typical(recommended) to keep it real simple as shown below.

I’ve already downloaded Windows Server 2008 ISO file from microsoft site. I’m selecting that Image as my installation media as shown below. You can choose DVD if you already’ve DVD handy.

You’ve to choose either Enterprise or DataCenter Version and proceed to next as shown below.

I’m naming it as SANDC as shown below(this machine would be my Domain controller and SAN Server).
I’m creating this machine with 50 GB of size total(My entire SAN is included within this 50 GB of storage). You can choose accordingly.
Now It’s time to customize your Hardware. Click on the Customize hardware button as shown below and remove Floppy Drive and Printer devices. Also, you’ve to choose your Network adapter accordingly here.
Any device can be added/removed or type of the device can be changed later even after installation with no issues. That’s the beauty of Virtualization:)

Single Network Adapter(NIC) is enough for this machine since it’s acting as a DC and SAN. We need 2 NIC cards(one for public and one for private) for Node1 and Node2 machines since they are the actual machines participating in cluster.
Click OK and then Finish. You’ll be welcomed by the Microsoft Windows Server 2008 Installation Screen.
You should be seeing similar screen as shown below once you click next-next(I skipped activation, because mine is a free trial version and i don’t have any activation Key).
Nowwww, it’s time to Go and Grab some coffee or Soda 🙂 It will take 10-15 minutes to complete installation. Similarly Install 2 more VM’s with names Node1 and Node2. Once done make sure that all the latest updates are installed by clicking on “Windows Update” in Start menu(You’ve to be connected to Internet to be able to do this.) Let’s see how things look at first and how to create a brand new domain and add new machines to domain in the next series.

Installing SQL Server 2008/2008R2 Failover Cluster- Part1

This is the first part of the series “Installing SQL Server 2008/2008R2 Failover Cluster”.

Let me ask you something first! Have you ever been in the situation where you want to explore about your cluster, but your hands were tied because of the Live Production Server? Raise your Hands Up if “YES”.  I can see lot of hands raised. Okay!Come back to your normal position before somebody sees you raising your hand, sitting in front of your computer ;-p.
Did you ever think that ” hey what happens if i do this on my cluster, what is that option, what is this option etc…” but again you couldn’t because of the real environment. I Agree we’ve POC(Proof Of Concepts) Servers for DBA’s team, but how much freedom do you really have to destroy the entire cluster?? Do you really think that you Boss will be Okay if you destroy the entire cluster in your LAB?? Most of the LAB environments I’ve seen will be a simple Stand Alone Server(s) where we can install and play with new SQL Server(s) and Service Packs and so on….But really they don’t fulfill our desire to explore and play with cluster and SAN!!

Don’t worry…in this Series I’m going to explain step by step installation right from creating your own Domain on a Domain Controller, Build your own SAN(Yeyyyyyyy! Exciting huh???), Build your Windows Servers and at last Installing SQL Server 2008 Failover Cluster 🙂

Before going any further, please read What a cluster can do?. So…by this time i assume you understood what a cluster can do from 20,000 miles distance!
Let me explain little bit further:

  • Failover cluster is a combination of multiple Servers(Physical Nodes) all connected to a shared storage(SAN-Storage Area Network).
  • If your Primary Node fails for some reason,the hot spare node(Active-Passive config) takes over the ownership of your application and all your operations continue to work seamlessly
  • Failover Clustering provides high availability for your entire SQL Server Instance(Failover occurs as a Single unit) unlike Log shipping or Database Mirroring where they offer only Database level Failover. 
  • Your SQL Server Failover Cluster appears as a single computer to the clients connecting to you SQL Server.They don’t even know at what node SQL Server is running on. 
  • SQL Server offers Single Instance Clusters and Multi-Instance Clusters.
  • Single Instance:Let us say, you’ve only one SQL Server Instance running at any given time on your cluster. It’ll be running either on your 1st node or 2nd node.(Active-Passive).
  • Multi Instance: Let’s say you’ve 2 nodes running 2 Instances or even 4 Instances of SQL Server, Or let’s say you’ve 3 nodes where you’ve 2 Instances of SQL Server(Active-Active-Passive), the third node serving as a standby node ready to take ownership in an event of any failure of Node1 or Node2.
Hopefully below screenshot makes it more clear how things work in Clustered environment.

Things to Know:

  • Failover Clustering is an Enterprise edition feature. So, You can create a FOC only on Windows Server Enterprise or above(Windows Server Data Center Edition).
  • SQL Server 2008 Enterprise on Windows Server Enterprise/Data center supports upto 16 Physical Nodes and 50 Instances of SQL Servers 🙂
  • You can do SQL Server Cluster installation with SQL Standard edition too(But remember Windows needs to be minimum on enterprise edition)…but it only support upto 2 physical Nodes and can be scaled upto 16 Instances of SQL Server!!(which is never a good solution to go upto 16 Instances on Just 2 Nodes)
  • SSIS/SSRS are not cluster aware by default.(You can imagine SSRS as a Web Service where you really don’t need to be as a fail over cluster service. Typically it goes with scaled out deployment on NLB Clustering).
  • There are few tricks where we can cluster SSIS, but it is not recommended by Microsoft to cluster your SSIS installation.
Initial Preparation notes/Prerequisites for creating your LAB on your Laptop:
Download and Install Vmware Workstation on your Laptop. You can really go crazy with Vmware ESX(i) hosts and Vsphere or Citrix XEN Server. It’s up to you if you really think that your Laptop can handle all that load. I prefer VMWare Workstation to keep it very simple.
Download Openfiler here or Starwind Software here to Build Software based SAN. In my demo I’m going to use Starwind Software. I prefer Starwind considering its simplicity and ease of implementation(especially for LAB purposes).
Download Windows Server enterprise eval edition from microsoft.
Download SQL Server 2008/2008R2 Enterprise eval Edition from microsoft.
General Guide Lines for Installing a cluster in your Production environment:
  • Minimum 2 windows servers(enterprise edition) besides your domain controller.
  • All the participating Hardware and drives should be certified by microsoft.
  • minimum two NIC are needed per server. Netbios should be disabled on the network cards associated with HeartBeat(Private network).
  • Shared Storage(SAN) is needed. Again PS, this should be microsoft certified.
  • Ensure that disks have same drive letter mappings on all the physical nodes participating in clustering.
  • Windows Server Failover Clustering Feature and Application role should be added on Each node manually participating in SQL clustering.
Let us see the actual Windows installation(s) and setting up domain controller in the Second part of this Series. See you in next part.

What a Fail Over Cluster can do for us?

Cluster/ActivePassive/ActiveActive/SingleInstance/MultiInstance/Failover/Nodes/Services/Offline/Online….all these are the words which you will be listening very often if you are working with Windows Servers. (I’ll not be explaining all those terms and terminologies here in this blog post. They will be covered in another Blog post under Installing SQL Server Cluster.)
So what exactly is a Cluster? Let me try to explain it in understandable English language :-p
Let’s assume you’ve a very critical Application which your company CEO needs all the time to make his critical decisions for your company growth and it has SQL Server as its Backend and you are that awesome DBA who is supporting that SQL Server. Let’s say on one unfortunate day your Windows Server where you installed your SQL Server (let’s call it as ServerA) went down for some reason and Windows team is working on to bring server UP. Throughout this period when server was down your CEO will not be happy because SQL Server is not available implies the application is impacted.
Imagine if you had another Windows Server (let’s call it as ServerB) which takes ownership of the services and Applications in matter of seconds when your ServerA has any issue automatically. Isn’t it awesome??
Imagine multiple servers as a group always communicating with each other regarding their health and if one server is not healthy (In our case it was shutdown), next server which is available in that group takes care of unhealthy Server. Isn’t it awesome?? That’s the concept of Clustering in Windows. Nothing scary and nothing confusing right…See how simple it is to understand when we speak English J
PS we are only focused on Failover Clustering, Not NLB (Network load balancing) in this context.
So Clustering is nothing but a Hardware Solution for High Availability for your critical applications, making sure that your Apps are always available to users.
By this time you should be thinking about how expensive is this solution?? Unfortunately it’s pretty expensive solution because you need multiple Physical Servers (Nodes – I’ll refer Servers as Nodes from here). All the nodes which are participating in clustering should be exactly same in all aspects (for example OS Edition/Version, Service Packs, patches, Drivers Installed, hardware plugged in etc)
In Windows Server 2003 it used to be called as MSCS (Microsoft Clustering Services).You can launch this in administrative tools – Cluster Administrator or just Run-Cluadmin. Starting Windows Server 2008 they renamed it as Failover Cluster Management Services. You can launch this in administrative tools – Failover cluster management.
Quick Glance of Windows Server 2003 MSCS:
Quick Glance of Windows Server 2008 FCMS:

This is from my Test Lab which I created on my laptop. I’ll post a blog post on how to setup a cluster on a laptop pretty soon. Stay tuned!! FYI you can see, I’ve powered Off NodeB and you can see all the services, Applications, Resources being taken care by NodeA (another Node in my Cluster).
That’s pretty much it what a cluster can do for us. Congratulations! You learnt a drop out of Clustering ocean for now;)