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".




Tuesday, 8 April 2014

Installing Failover Clustering With Windows Server 2008 R2

Introduction:

Creating a Cluster with Windows Server 2003 was a little bit confusing for administrators.Now with Windows Server 2008, its much easier.In this article I will be showing you how to setup a cluster with two nodes using Windows Server 2008 R2 Failover Clustering feature.

Creating a failover cluster means you have atleast two servers connected to a shared storage.

Failover Clustering System Requirement:


  • Windows Server 2008 R2 - Failover Clustering feature is available with Windows Server 2008/R2 Enterprise/Data Center editions. You don't have this feature with the Standard edition of Windows Server 2008/R2.
  • Domain role - All servers in the cluster must be in the same Active Directory domain.
  • DNS - The servers in the cluster must be using Domain Name System (DNS) for name resolution.
  • Account for administering the cluster - When you create a cluster or add servers to it, you must be logged on to the domain with an account that has administrator rights on all servers in that cluster (if the account is not a Domain Admins account, the account must be given the Create Computer Objects and Read All Properties permission in the domain).
  • Servers - Two identical servers in brand, model and configuratons.
  • Device Controllers (HBA) - i/SCSI or Fiber, both also to be identical.
  • Storage - You must use shared storage that is compatible with Windows Server 2008 R2.
Now that you know the requirement for Failover Clustering, lets start

Configuration on Server A:

  1. To install Failover feature, open Server Manager, click on Start > All Programs > Administrative Tools > Server Manager
  2.  Expand Features, and then click on Add Feature.The list of available features will be listed, select the Failover Clustering and click NextClick Install
  3. The Failover Clustering feature will be installed.Click Close.

Configuration on Server B:

  1. Again on Server B, we will need to install Failover Clustering feature as well, so click Start > All Programs > Administrative Tools > Server Manager Click on Features and then click on Add Features
  2. Choose the Failover Clustering feature and click Next
  3. Confirm installing Failover Clustering by clicking on install Close the Add Feature Wizard once installation is completed Now that both servers have Failover Clustering feature installed on them, we can create the cluster on one of these server and join the other one to the cluster.
Now, we need to open and configure our cluster name, IP address and nodes.

To open Failover Clustering, click on Start > All Programs > Administrative Tools > Failover Cluster Manager
>> This need to be done on a single server only << 



      1. The first step in creating a successful failover clustering, is by validating the existing systems and shared storage. This is done by the option Validate a Configuration                                          When you click on Validate a Configuration, you will need to browse and add the cluster nodes, these are the servers that will be part of the cluster, the click next  Choose to Run all tests and click Next The available tests will be displayed in the confirmation window, click Next to begin validating you cluster.  Review the validation report, as you configuration might have few issues with it and needs to be addressed before setting up cluster. 
      2. Now that the configuration is validated and you are ready to setup your cluster. Click on the second option, Create a Cluster, the wizard will launch, read it and click Next 
      3. You need to add the names of the servers you want to have in the cluster. You can start creating your cluster with a single server and then add other nodes in the future. Browse to your servers and then once all the servers (nodes) are listed click Next 
      4. After the servers are selected, you need to type a name and IP for your cluster 
      5. On the Confirmation window, review your settings. The following will be displayed in this window: cluster name and IP address, selected servers name. If all info is proper, then click Next else click Previous and correct which setting needs to be adjusted.  After you click Next, creating the cluster will begin.
      6. The summary windows will be displayed after a successful setup of the cluster. 
      7. Open Failover Cluster Manager and you will see your nodes and setting inside the MMC. Here you can configure your cluster, add new nodes, remove nodes, add more disk storage and so on.

Summary:

In this article, we have created a two node cluster using Failover Clustering feature which is available with Windows Server 2008 R2 Enterprise and Data Core editions.

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...