Showing posts with label Windows 2012 for the DBA. Show all posts
Showing posts with label Windows 2012 for the DBA. Show all posts

Wednesday, February 19, 2014

Windows 2012 for the SQL DBA: .NET 3.5 Fails to Install

Hello Dear Reader!  I know it has been a while since last we spoke.  Sorry for the long absence.  I've been working on a lot of things that you will see coming here in the weeks and months ahead.  But first I wanted to write a blog on a subject that I've hit multiple times.

 Windows Server 2012 ships with .NET 4.0 already installed.  However SQL Server 2008-2012 requires .NET 3.5.  Therefore, when you install SQL Server on Windows Server 2012 you must first install the .NET Framework 3.5.

"So Balls", you say, "What's the problem, just enable it?"

Ahh Dear Reader, Thank you for getting to the heart of the matter.  The normal way that you do this is you add the Feature .NET 3.5 Framework to you're server.  I've done this enough times that sometimes it works just fine.  Other times, it blows up.  If the GUI works for you then, keep using it.  This blog is about what you need to do when it goes wrong.


Everything is bright and sunny in this version.  We will have no errors using the GUI whatsoever.  We start off with going to the Server Manager Dashboard.  Click the Manage button.  Then Click Add Roles and Features.

Next we go to Server Selection.  If you are installing this feature on a remote server you would select it here.  If you install this locally then just click the Server Selection menu item and then click directly to the Features Menu option.  The .NET 3.5 Framework is a feature not a role.

After that you check the box next to .NET 3.5 and click Next.
Click Install and away you go.

It was a Dark and stormy night as the DBA walked into the data center...

Actually it could be the middle of the day.  Whenever it is you attempted to install .NET 3.5 and something went wrong.

Regardless of the time you get the following error.

"Installation of one or more roles, role services, or features failed.  The source files could not be found. Try installing the roles, role services, or features again in a new Add Roles and Features Wizard session, and on the confirmation page of the wizard click "Specify an Alternative source path" to specify a valid location of the source files that are required for the installation.  The location must be accessible by the computer account of the destination server."

The next option is to go back through the Wizard and specify the location for installation.  I prefer to switch over to PowerShell.  At this point I've attached my ISO as my D drive.  So I'll just use the WindowsFeature cmdlet to do the install from my local media by typing:  Install-WindowsFeature NET-Framework-Core -Source D:\Sources\SxS
Then after a minute or two:
Installed and ready to go install SQL Server.

"So Balls", you say, "Could you have just browsed to the same path using the Wizard?"

Great question Dear Reader!  There is not a browse feature for the alternate path portion of the Wizard, but you could have manually entered D:\Sources\SxS and received the same result.

While the error screen had it all in the writing, when I first received this error I found a way to manually install from the Windows 2012 ISO Media and used it ever after.  Personally I like using PowerShell as a preconfiguration option.  It's easy to have a list of scripts and pull them out and run them each.

Alright Dear Reader, as always Thanks for stopping by.



Wednesday, February 20, 2013

Windows 2012 for the DBA Setting Your Server to High Performance

Hello Dear Reader!  I’ve been doing a lot of work with Windows Server 2012 lately.  The interface is wildly different from what we’ve gotten used to in the past.  

If you’ve worked with Windows 8 or Windows Phone at all, then the UI will come as less of a shock to you. 

 If you haven’t, then hold on to your pants.

This creates a lot of fun in figuring out how to do things we already thought we knew how to do.

“So Balls”, you say, “What did you know how to do that you don’t now know how to do?  Did that even make sense?”

Yes Dear Reader it did.  Ever since the Windows Servers have been given the same GUI upgrades as the user/Windows upgrades (Thank GOD there was no Windows Server ME), ever since Perfmon has been renamed 50 BAGILLION times, there have been DBA’s scratching their heads going ARRUUU!?

Continuing that trend is the way CPU performance is handled.  

Thanks to brilliant MVP’s such as Glenn Berry(@GlennAlanBerry | Blog) and Brent Ozar (@BrentO | Blog) we’ve had guidance on how to use CPU-Z, see Glenn’s Blog on this subject, and how Power Saving Options are bad, see Brent’s Blog on the subject

Now we have Window’s Server 2012 and we know we should check our power saving options, and we should use CPU-Z.  When we get a bad reading how do we change it?


There is a Windows 2012 Performance Tuning document that is worth a read, Click here to download the Word Doc.  If you have owned a laptop in the past 5 years with Windows Vista on up on it you are familiar with the power management plans.  Interestingly enough, or not based on your viewpoint, this is in Windows 2012 as well.   Below is an exert from the Document


Common applicable scenarios
Implementation highlights
Balanced (recommended)
Default setting. Targets good energy efficiency with minimal performance impact.
·         General computing
Matches capacity to demand. Energy-saving features balance power and performance.
High Performance
Increases performance at the cost of high energy consumption. Power and thermal limitations, operating expenses, and reliability considerations apply.
·         Low latency applications
·         Application code that is sensitive to processor performance changes
Processors are always locked at the highest performance state (including “turbo” frequencies). All cores are unparked.
Power Saver
Limits performance to save energy and reduce operating cost.
·         Deployments with limited power budgets
·         Thermal constraints
Caps processor frequency at a percentage of maximum (if supported), and enables other energy-saving features.

Dear Reader I’m going to tell you right now, Balanced is not recommended.  High Performance is.  If you’re not sure why go read Glenn and Brent’s blogs about Green options and how they will hinder your CPU performance.

Now don’t get me wrong I’m all about the environment, I love me some outside, but when I have a server in a rack the only option for me is High Performance.  

The fact that Balanced is the DEFAULT is a HUGE MISTAKE in my opinion.  If you know how to find and change your power settings, have done the due diligence to understand what your usage consumption is vs. your peak hours, and care about the cost of your data center to the point that this matters, then change it.  Also stop reading here.

If like most of us you have a DAY job, get really busy, and expect your server to perform with the power and performance you purchased it at, then keep reading.

I used CPU-Z to find a couple of facts out right away.  

My server with 24 cores each running at 2.5 GHZ is running at 1.1 GHZ.  YIKES!  That’s ½ of this expensive box that we paid for.  So now I’m going to open up a Command Prompt in Administrator Mode. 

To do this go to the upper right hand corner, get the Spy Glass Icon, and type cmd, Right Click on the Icon instead of Clicking on it, and then click the option at the bottom of the screen that says Run As Administrator. (You can also pin this to the start tiles window, but one thing at a time).

Now in our Command Prompt type powercfg –LIST to see all of the active plans.  Your currently selected plan will be denoted with an *.

We can see that Balanced is currently select, as this is the default out of the box configuration.  So let’s change this.  Make note of the GUID above because you’re going to need it.  The command is powercfg –SETACTIVE <guidoftheplanyouwant>.

We run another powercfg –LIST to check our options and we see that High Performance is now our default.   Another look at CPU-Z and everything looks right as rain.


For more on this subject Dear Reader, visit the Windows Technet site on How to Set the Default Power Plan for Windows 2012 by clicking here

As for Windows Server 2012 I must profess, despite the out of the box options, I like it.  Always on is more stable, It reads ISO files without a 3rd party installer, and while the interface is different I’ve been able to find a lot of configuration items that were previously in hard to reach places.  Basically more blogs to come.

As Always Dear Reader Thanks for Stopping by and I hope this helps you get the most out of your server!