Setting up SQL Server 2012 AlwaysOn Availability Groups – Part1

I am in the process of setting up my lab for SQL Server AlwaysOn Availability Groups on top of Windows Server 2012 DataCenter Edition and would like to share my experiences . In this post, let me show you setting up your Windows Cluster which is the back bone for SQL Server AlwaysOn….

My Basic Lab setup:

4 VM’s (1 for DC/DNS and 3 other machines for SQL Server Instances). Before proceeding any further please make sure you understand the difference between AlwaysOn Failover Cluster and AlwaysOn Availability Groups(AG). They are not the same! Am talking about AG’s where I’ll be installing three individual Standalone SQL Instances on three different Windows Servers(These 3 windows servers will be acting as Nodes in a windows Failover Cluster, but with no shared Storage-No SAN required, can go with DASD’s or SSD’s or JBODS etc). In other words your Windows Servers participating in AG should be members of the same Cluster, but your SQL Server Instances can be Standalones which are completely isolated from each other! Hope am not confusing you…(Will explore more on SQL Server AG terminology in upcoming posts).

Note: All the Nodes participating in your Cluster should belong to same domain. Cluster validation may result in storage warnings as we are not using Shared Storage.

Step1: Build VM’s as needed.(For building VM’s and setting up networking Please see my previous posts on SQL Server 2008 Failover Clustering)

Step2: Build Windows Cluster

Am on Server Manager of NodeA as Domain Admin-Add Features/Roles and select Failover clustering Feature.

After few seconds I got success msg as shown below.

Perform the same on all the nodes you plan for creating an AG.(In my case I’ll install FC Feature on remaining 2 nodes as well).

Once done Installing this feature on all the nodes, I started Failover Cluster Manager on my machine SreeSQLA and started to create Failover Cluster. Added my 3 machines as you can see below.

Now, it’s time to validating my Cluster(You can do this even before starting creating your cluster). See below warnings I got on my cluster.

Network Warnings I got:

Basically complaining about single point of failures, I am ignoring as this is my lab.(In our Prod environments, we should take care of these warnings before building cluster).

Storage Warnings I got:

Ignore them as we are intentionally doing this…
Now I assigned a name and IP for my windows Cluster as you can see below.

You can see “Add all eligible Storage to the cluster” button which is new to Windows Server 2012 – I unchecked it and clicked Next. After few seconds…I got the below screen 🙂

Now, for verification, see SREEWINCLUST being added in my AD.

Perfect!! Now Let’s open Failover Cluster Manager from Administrative tools and see how it looks with this strange configuration we did without storage.

As you can see it selected Node Majority(Remember, we’ve No Quorum Disk – FYI, we can change as needed)

It’s listing 3 Nodes and Networks as expected, Interestingly you can see “Disks” and “Pools” under storage(This is new with Windows Server 2012). If you select Disks or Pools you should see nothing in the right side pane as seen below.

You will get 0 pools as well under storage Node. Interesting Huh???

You can double check your cluster ip by just pinging your Cluster Name as shown below and double check everything looks as expected.

I’ll stop right here for setting up the foundation(Windows Server Failover Cluster) for SQL Server AlwaysOn AG!- Let’s see some actual SQL DBA stuff in upcoming posts…Stay Tuned!

Hope you learned something new and also hoping this helps in setting up your own lab. Cheers!

 

 

 

Logout/Log off in Windows Server 2012

Let me show you where you can find  log off Option in Windows Server 2012. I know this might sound stupid, but let me tell you this..I struggled for a while to find out where this is 😀

Most of us are already aware of this, where to get power off option right…? (Shown in the below screenshot for whoever is completely new to Win 8 World).

I got this Vertical Window by hovering my mouse at Bottom Right Corner of my screen, Once you get this click on Settings and you see something as shown below..

Well, I can only see Shutdown and Restart Options!! Where is this Log off hiding at??

you’ve to Click on the annoying Start Button( you will get this by hovering your mouse at the bottom left most corner of your screen, shown below)

Now, you will get this Metro Style Screen, where you’ve to click on your User account Icon at the Top Right Corner of your Screen and you get options as shown below.

There you go…Sign out is our new Log Off Button 😀

 

 

 

Windows Server 2012 Core – Graphical Shell.

In this post, let’s see one of the best enhancements we got with Windows Server 2012, flipping Graphical Shell as needed!

As you can see below, I’ve Installed the normal Windows Server 2012 Datacenter Eval Edition.(I did not selected CORE during the Installation).

Nothing strange right…!

Now, let’s see how we can uninstall the graphical shell from this Server.

Let me tell you this, all it takes is one Powershell command!

 Open powershell and type “Uninstall-WindowsFeature Server-Gui-Shell” and hit enter. Before that I recommend to try the same with -whatif Option. Basically, It tells you what happens and what are the consequences if you enter that command in powershell instead of executing it right away:) See below for what I’m saying…

Okay, now I opened PowerShell as Admin and ran the same command without whatif, I got something like this.

After few seconds, it returned Success and requesting for Restart to apply the changes as shown below.

Once I restarted my Machine, all I got is the screen as shown below.(You’ll see Server Manager as well, I closed it)

Huhu…no Fancyyy pancyyyy GUI any more. All you got is cmd/powershell visible to you. The awesome news is you can just flip the coin the other way around and you’ll get your GUI back in place. No need of Re-Installing the OS from scratch 🙂

Behind the scenes, all it’s doing is adding and removing one of the features available in Windows Server 2012.

Adding back your GUI is as simple as it. Open Powershell from the command window you get and type the below statement as shown in the below screenshot…

Note: For actual execution run the above command without -whatif Option.

Once I restarted my Server, I was welcomed with normal windows appearance similar to first screenshot in this post 🙂

Bottom Line : Core OS is the Baseline which is always available and everything is built on top of the Core OS. Graphical Shell/Infra can be enabled and disabled as needed based on your requirements.