Setting up SQL Server 2012 AlwaysOn Availability Groups – Part2

In the Previous Post, I explained how I created my 3 node Windows Cluster. Now, In this post let me show you Installing SQL Server 2012 on Windows Server 2012 for our AlwaysOn Setup.

As I already mentioned in previous post, we will be Installing 3 individual standalone SQL Instances(I’ll go with Just Default Instances to keep it simple) on three nodes participating in our Windows Cluster. FYI, I’ll be using the same Service account for all the three Instances.

Note: For Availability Groups, you should use the same service account on all the Instances participating, if you are using Kerberos Authentication. Use Separate Service accounts on your Production deployment only if you are 100% sure that your applications are not using Kerberos. 

I’ve already setup my service account in my AD and added as a user on all the 3 nodes locally and granted “Lock pages in memory” and granted “Perform Volume Maintenance Tasks” in local security policy.

Okay, now let’s begin the actual Installation.

Step1: I inserted my Media in my DVD drive and started setup.exe as you would do normally. Now I selected “New SQL Server Standalone Installation or add features to an existing Installation”. Got No Validation warnings as you can see below…

Step2: I proceeded further and Unchecked “Include SQL Server product Updates” – My Server is not connected to Internet/It can’t search Updates through WSUS in my case. Well, that’s fine! Once I clicked Okay, It started Installing base/Setup files as you can see below.

Everything worked fine as expected and got the below screen in few seconds…

Step3: Select your required features. I selected below shown features and Services.

Note: As you can see BIDS is gone. It has been replaced by SQL Server  Data Tools!

Step4: I selected Default Instance and my Root Installation is on E$ as you can see below(Screenshot Error, my bad).

Step5: Time to provide Service accounts. See below for my selection…

Step6: Time to choose Administrators. I’ll always add myself and the DBA group as Admins.

Very Important: Now, don’t just proceed with Next, go to Data Directories Tab and select your data and Log Drive paths. In my lab I’m having the same Drive letters and folder structure across all the 3 nodes and I recommend you to have a similar strategy for your real world deployments(Don’t leave it defaults…especially when dealing with named Instances, because SQL Server will create Folder specific to Instance name). This is required for successful Automatic Failover of your AG’s. If not you’ll end up with Database(s) not coming Online as expected and manual intervention is required(Similar behavior as DB Mirroring), which is not something we want in our real world deployments.

As you can see, I just created Folders named “Data” and “log” under my Data and Log Drives and will be doing the same on all other SQL Server Instances participating in this AG.

TempDB location is up to you and System Databases are also up to you. ( System Databases can’t participate in AG, same as Mirroring)

Everything is pretty simple/straightforward and went smooth right…..! Wait…..at this point my Installation had some issue and I got this annoying error Message.Erkkkkkkkkkkkkk…!@#$#

“Error While enabling Windows Feature : NteFx3, Error Code : -2146498298” while Enabling OS Feature ‘NetFx3’

Hmm this is something which we never expected at this stage, especially after we passed all the validations and checks at the final stage…! I Thought we will get this interruption only on Windows Server Core. Okay, Now we know we can expect this on Full Blown Windows as well(If we don’t take care of this prior to our SQL Server Installation)

Anyways, what is this all about? What is it talking about…What feature it is referring to? The Answer is “.NET 3.51 Payload“. Yes, we must manually enable .NET 3.51 Payload in Windows Server 2012. (Scroll a little but up and see the screenshot for Step3. you can see under the Prerequisites for selected features, it is saying that “Microsoft .NET framework 4.0 is already Installed, but it’s asking us to manually enable .NET framework 3.5 from GUI) For this you need to have Windows media handy or should be connected to Internet, OR you can enable this automatically by enabling Remote Management which you might not do on your Production Boxes.

So, How to Fix this Annoying thing? Yes, you are correct if you said PowerShell (Few of you might thought about DISM or Just GUI for adding this feature as you used to do in Win Server 2008R2….YMMV!)

Note: Even the Error Message says, go and enable this feature using Server Manager GUI, it might fail!!!….Avoid GUI for fixing this.  Instead use awesome PowerShell guys. I’ll show you powershell way of doing this…

1. Insert your Windows Media in your DVD Drive(in My case it’s D:)

2. Open Powershell as Admin and type  “Install-WindowsFeature Net-Framework-Core -Source D:\Sources\sxs” without double Quotes and hit enter.

After a minute or two, I got success message as shown below 😀

Before fixing this, my Installation was only able to Install few components and my Core DB Engine failed Installing as you can see below.

Once I enabled .NET 3.5 via Powershell,  I was able to re-Install the required components which we had issues earlier without any further Issues. Btw, I enabled this on rest of my nodes at this point to avoid this issue… 🙂

(May be I’ll come up with a short Blog post later just on this Error message)

Strange things right?? Anyways besides this error,  understanding Service Accounts Requirements and Data,Log Files placements for your SQL Instances is very crucial.

I’ll proceed further and Install standalone Instances on the remaining 2 nodes as well for now….Let’s see enabling AlwaysOn and setting up in upcoming post.

Hope this helps if you get into same situation as me while Installing SQL server 2012 on top of Windows Sever 2012.

Cheers!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: