create and setup a sql clustering on your desktop or laptop

Upload: kumar-muthu

Post on 02-Jun-2018

306 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    1/12

    Sql server Blog Forum

    DBACreate and setup a SQL clustering on your Desktop or Laptop

    Create and setup a SQL clustering on your Desktop orLaptop

    by Muthukkumaran kaliyamoorthy Published on: September 27, 2012Comments: 9 CommentsTags: SQL clustering on Desktop Laptop, SQL clustering setup, What is clusteringCategories:DBA, DR/HA

    How to create and setup a SQL clustering on your Desktop or Laptop

    I thought to write this post after I discussed in a forum. SQL clustering is a bit complicated one.mean most of the DBAs are not configured or tested it, because we dont get a chance to do or tolearn SQL clustering. Also it needs bit knowledge from out of SQL (Windows AD, Network andStorage (SAN)).

    In this post, I will give you an idea how to configure SQL failover clustering to yourself. We aredoing everything in virtual environment (Single machine) the same you can do physically but yoneed all in physically in production environment (Machine, Domain, Storage & network). Its notpossible to show all the steps and screen shot here because it has more than 40 screenshots. I

    have prepared a document and will share with you if needed.What is SQL clustering?

    In general cluster means more than one.

    SQL clustering is a collection of two or more servers access the data from same single sharedstorage (SAN), if one server failed another one server will take the data from the storage and theapplication will be running without any problem.

    I suggest readers to read Kendra Littles article. Its good article and she explains with diagram.

    http://www.brentozar.com/archive/2012/02/introduction-sql-server-clusters/

    The followings are the software for setup clustering.

    Software Free/Trail URL location

    VMware workstation 30 day trial VMware workstation

    Starwind 30 day trial Starwind iscsi SAN

    Windows server 2008 60 day trial Windows server 2008

    SQL server 2008 180 day trial SQL server 2008

    Planning the IP address

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    2/12

    Component Name IP address

    Domain controller xxx.xxx.1.6

    Node1 / Machine1 xxx.xxx.1.7

    Node2 / Machine2 xxx.xxx.1.8

    Windows cluster xxx.xxx.1.9

    MSDTC xxx.xxx.1.10

    Virtual SQL server xxx.xxx.1.11

    Private IP xxx.xxx.2.11

    Public IP xxx.xxx.2.12

    Installing VMware

    Installing a VMware workstation is an easy one. Just click the typical and next.

    Creating VMware

    Creating three virtual machines using the windows trail edition and assigning the right amount oRAM, CPU & disk Space for each guest host. Configure the network adapter for public and privatenetwork for internet connection.

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    3/12

    1. Domain controller (DC)

    2. Machine1 (Node1)

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    4/12

    3. Machine2 (Node2)

    Creating Domain DC

    The domain controller is also known as active directory.

    http://en.wikipedia.org/wiki/Active_Directory

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    5/12

    Install and create a domain.

    Creating Shared disk

    We know SQL clustering needs a shared disk typically SAN. The use of StarWinds ISCSI we canmake our local disk as shared disk. Because we dont have a SAN storage server physically so iam creating the shared storage in the DC machine itself using StarWinds iSCSI.

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    6/12

    Format the disk on each guest and use it.

    Creating and installing windows Failover cluster

    Installing the windows fail over cluster.

    Validate and add the nodes.

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    7/12

    Assign the IP and Cluster the Nodes

    Add the MSDTC

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    8/12

    Installing SQL Failover cluster

    Install the SQL server failover cluster on both the nodes. Its easy one just you can give thenetwork IP address and choose the shared disk.

    Second node will automatically display the SQL cluster name and we can just add it.

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    9/12

    To view the Cluster admin go to run > type CLUADMIN.MSC

    Node1 (Muthu1) is the primary host. Which will be taking care of the SQL server and the databasapplications.

    Use this command to check which node the cluster SQL server is currently running.

    SELECT SERVERPROPERTY (ComputerNamePhysicalNetBIOS)

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    10/12

    How do I know, Is the cluster automatically fail over the server, if anything goes wrong on therunning node?

    Just test it. Power off the Node1 (Muthu1) and you can see the SQL server automatically fail overto the node2 (muthu2).

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    11/12

    When the SQL cluster will be down? Or Is clustering is disaster recovery?

    SQL fail over clustering is not a disaster recovery. In case if the storage (SAN) is not availablethen clustering wont start.

    Testing: Power off the DC. In our case DC machine has storage shared disk. Hence the shared dis(SAN) goes off, then SQL clustering will not work.

    My special thanks go to my VM ware team.

    Muthukkumaran kaliyamoorthy

    Im currently working as a SQL server DBA in one of the top MNC.Im passionate about SQL Server And Im specialized inAdministration and Performance tuning. Im an active member ofSQL server Central and MSDN forum. I also write articles in SQLserver Central. For more Click here

    More Posts - Website

    Share this

    9 Comments - Leave a comme

    Ramkumar

    Nice work muthu.

    October 9, 2012 at 6:03 p

  • 8/10/2019 Create and Setup a SQL Clustering on Your Desktop or Laptop

    12/12

    2014 Sql server Blog ForumAll rights reserved - Powered by WordPre

    christi parks

    I am not a programmer but I have this SQL subject this session and have to prepare forit. What all topics should be covered in it?And has anyone studied from this course http://www.wiziq.com/course/125-comprehensive-introduction-to-sql of SQL tutorial online?? or tell me any otherguidancewould really appreciate help

    January 23, 2013 at 7:08 p

    Subbu

    Great muthu. very good explanation. thanks

    February 7, 2013 at 3:38 p

    Muthukkumaran kaliyamoorthy

    I am glad i could help you

    February 23, 2013 at 2:09 p

    msb

    Hi Muthu,Nice post.Can you send the doc that has all screenshots?Thanks

    msb

    January 7, 2014 at 1:57 a

    Suresh Kumar

    Good work,Can you please share the document which you prepared?

    March 1, 2014 at 10:16 p

    jennifer

    Nice sharing. Java training in chennai

    March 27, 2013 at 12:21 p

    this post is quoted by SQL Server High Availability A Right Decision | SQL DBASupport . COM - Knowledge Centre for SQL DBAs

    [...] http://www.sqlserverblogforum.com/2012/09/create-and-setup-a-sql-clustering-on-your-desktop-or-lapto [...]

    July 4, 2013 at 12:15 p

    Neel

    Hi Muthukkumaran ,Nice post,can you please share the document which you have prepared.

    Thanks

    December 24, 2013 at 4:30 p