Thursday, 17 April 2014

Installing Microsoft SQL Server 2008 R2 Cluster Step-By-Step

This is a step by step guide on SQL Server 2008 R2 Cluster.
Let's begin with the pre-requisites

Pre-requisites:

In order to plan everything ahead, we need to prepare some IP's and names as well as Network Configuration. During the deployment you will be using IP's and Names for the following
  1. Windows Cluster
  2. DTC
  3. SQL
You can plan for those and document them for use ahead of time, just to save yourself some time.
Please refer to the table below


DescriptionHostnameIP AddressSubnet MaskDefault Gateway
Cluster IP AddressXXCLUSTER172.21.XX.XX255.255.255.128N/A
SQL Instance IP AddressXX2010SQL172.21.XX.XX255.255.255.128N/A
MSDTC Virtual IPXX2010SQLDtc172.21.XX.XX255.255.255.128N/A
SQL Cluster Node 1Node1172.21.XX.XX255.255.255.0172.21.X.1
SQL Cluster Node 2Node 2172.21.XX.XX255.255.255.0172.21.X..1
We then need to setup 2 Network Interfaces to be used in production and other as a heartbeat.

clip_image002

We need to configure the HeartBeat interface on each node as follows

Node 1
clip_image004clip_image006


clip_image008clip_image010

Node 2

clip_image011clip_image013

clip_image014clip_image015

We do a little test and make sure they can communicate

clip_image016

Now the heart beat has been configured, you need to assign IP's to the production interfaces, those are the interfaces that will communicate with the servers.

Now that the networking part is out of the way, let's go ahead and start the Failover Cluster Role installation.

Windows Failover Cluster Installation

The following steps need to be performed on both database tier machines.
  1. Click on Server Manager > Features > Add Features clip_image018clip_image020
  2. Check the Failover Clustering checkbox and click Next
  3. Click on Install to install the feature clip_image021
  4. Click Close to conclude the installation wizard clip_image022

Host Validation Tests:

Now we need to run the validation tests to make sure our nodes are correctly configured

clip_image024

  1. Click on Validate Configuration clip_image026
  2. Click Next at the validation wizard's intro screen clip_image028
  3. Click Browse in the Select Servers or a cluster window clip_image030
  4. Set the Object Types to Computers and search for the two cluster nodes clip_image032
  5. Once the two cluster nodes have been selected click on Next to proceed clip_image034
  6. Leave radio button at its default position (Run all tests) and then click Next clip_image036
  7. The validation wizard summary will be displayed. Review it and click Next to initiate the cluster validation clip_image037
  8. If the validation wizard returns any errors review and resolve them before proceeding. Errors need to be resolved before creating the cluster. Ensure that you review warnings.

Creating Windows 2008 Cluster:

SQL Server 2008 R2 clustering requires a windows cluster to be setup prior to creating the SQL node. To create the windows cluster perform the following steps.
    1. In the Failover Cluster Console click on Create a cluster clip_image039
    2. Click Next on the welcome screen clip_image041
    3. Click Browse and select the appropriate cluster nodes clip_image043
    4. Click Next to run pre-configuration validation (essentially the same validation as before, but recommended to run again right before the cluster setup). clip_image044
    5. Enter the following information in the Access point for Administering the Cluster window
      • Cluster Name: SPSLUSTER
      • IP Address: 172.21.x.x
      • clip_image045
    6. Review the summary in the confirmation window and click Next to proceed with the cluster installation clip_image046
    7. If any warnings/errors were generated review them and retry if necessary. If none were generated click on Finish to close the wizard.

Verifying Cluster Storage and Quorum

Now in  windows server 2008 R2, the cluster Quorum and storage will be configured automatically, we need check on that clip_image048
And this seems right, now we need to check on the Quorum type to make sure that it is set to Node and Disk Majority.clip_image050''

Configuring Windows 2008(R2) Application Server

We now need to start deploying the application server role on both the nodes

clip_image052

clip_image054

clip_image056

clip_image058

clip_image060

clip_image062

clip_image064

clip_image066

clip_image068

clip_image070

Configuring MSDTC

clip_image072

clip_image074

clip_image076

clip_image078

clip_image080

clip_image081

clip_image083

clip_image084

clip_image086

clip_image087

Installing SQL Server 2008 R2 Cluster

Now we are about to start the installation of the First Node in the cluster.clip_image089
Enter your product key
clip_image091
Install the support files
clip_image093
Install Features
clip_image095
Configure the Network Name (this is going to be the cluster name) and the instances
clip_image096

clip_image098

Choose your Cluster Resource Group (I left it at default)

clip_image099

clip_image101

clip_image103

clip_image105

Configure the Service account Users and Passwords (Best practice is to use individual accounts)

clip_image107

clip_image109

Configure your locations (Best practice to separate Database File from Log Files)

clip_image111

The Install, But do not configure is the only option available as we haven't installed the pre-requisites for Reporting Services.

clip_image113

Make sure everything passes on the cluster installation Rules

clip_image115

Review your installation summary and click install

clip_image116

Now wait for installation to finish.

clip_image118

Now after the installation finishes, make sure your resources are up.

clip_image120

Now all that is good and green we need to start the installation on the second node.
So fire up the setup  and choose
clip_image121

Install Support rules and make sure all passes

clip_image123

Enter the Product Key

clip_image124

clip_image126

You will see that the setup has detected the current single node cluster from above, click next

clip_image128

Enter the same accounts and password and make sure everything is green

clip_image129

Review your installation

clip_image131

Click on install and wait the install to finish

clip_image133

Verify the Cluster

Now if you go to the SQL Server Clustered application properties you see both nodes added

clip_image135

I hope this document will help you in "Installing Microsoft SQL Server 2008 R2 Cluster".




SQL Server Query Execution Plans for beginners – Clustered Index Operators

In this article we will continue discussing the various execution plan operators related to clustered indexes and what they do, when do the...