Blog > Search Results

Are You Keeping Up With .NET Framework Versions? You Should Be

By: on December 10, 2015 in .NET Framework, .NET Framework 4.0, .NET Framework 4.5, .NET Framework 4.5.1, .NET Framework 4.5.2, .NET Framework 4.6, .NET Framework 4.6.1, SQL Server 2012, SQL Server 2014, SQL Server 2016, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

You may have seen one of the 1,000,001 Tweets, blog posts, and other warnings around SQL Server 2005 end of life, and prior to that, Windows Server 2003 end of life. But there is something else intrinsic to SQL Server that you also need to worry about making sure you are up to date which affects later versions of SQL Server you may be running: the .NET Framework.

If you’re using SQL Server 2012 or later, one of the required components is some version of .NET Framework 4.x. Windows Server 2008 R2 did not ship with .NET Framework 4.x, so you would need to install it on your own or have SQL Server do it. This is known as out of band. Windows Server 2012 shipped with .NET Framework 4.0 and Windows Server 2012 R2 shipped with 4.5. This is known as in band. The good news is that for installations of SQL Server 2012 or later, you would not have to install or enable .NET Framework 4.x; it’s just there.

Like any other component, the .NET Framework needs to be managed, maintained, and updated. Depending on how .NET Framework was installed/configured, either it will be managed as part of updating Windows (in band versions), or you will need to manually update if it was installed separately (out of band, such as .NET Framework 4.x on Windows Server 2008 R2 or if you installed .NET Framework 4.5 on Windows Server 2012).

Microsoft recently published an official .NET team blog post reiterating that .NET Framework versions 4, 4.5, and 4.5.1 will no longer receive security updates, support, or hotfixes as of January 12, 2016. This was first announced back in August of 2014, so it’s not like this is new news, but I can say from experience virtually no one is talking about it. MS’ new post talks more about the upgrade path. To sum it up, you need to install .NET Framework 4.5.2, 4.6, or 4.6.1 to be considered supported when it comes to your .NET Framework version. Security is a real issue for many, and those responsible may not know that your version of .NET Framework could be a possible attack vector. Is your security team aware of this impending problem? How will this affect your version matrices (you do have those, right?)?

The bigger question is this – have you even planned for this event in your environments for both servers and any clients or application servers that run or connect to SQL Server? Have you been keeping up with .NET Framework versions or did you just install SQL Server and forget about it? I would say that most people I encounter fall into the latter. Staying supported is a key component of being mission critical.

If you haven’t thought about updating/patching your .NET Framework version, now is the time to start planning the upgrade to your preferred, supported, and tested version of .NET Framework in your environments. If you do not test against your applications, you could possibly encounter problems. In other words, without testing you are rolling the dice. That is anti-mission critical and can lead to downtime.

Another question you have to get the answer to is this: who owns this upgrade? Is it the app owner? The DBAs? The sysadmins? The .NET Framework can be a bit of a grey area depending on the server and how it was installed.

Here’s a tip: if you’re considering 4.6, just go to 4.6.1 – you’ll not only have a longer shelf life of supportability, but they enhanced the behavior of MultiSubnetFailover (see this blog post for more information) which could benefit some Availability Groups implementations (I am trying to verify if it applies to FCIs; it should as well …). To help you get to green faster, here are some handy links:

  • This is the KB article to get information on how to download .NET Framework 4.5.2 as an offline installer (including desktop OSes and all Windows Server OSes).
  • This is the link article to get information on how to download .NET Framework 4.6 as an offline installer (including desktop OSes and all Windows Server OSes
  • The blog post linked above for 4.6.1 has links for its download.

If you need help planning or implementing your upgrade strategies, let us know.

Part 2: Windows Server 2012, SQL Server 2012, and .NET Framework – PowerShell

By: on June 1, 2012 in .NET Framework 3.51, .NET Framework 4.0, SQL Server 2012, Windows Server 2012, Windows Server 8

I’ve written about this topic in the past (Post 1 and Post 2).To quickly recap, .NET Framework 3.51 is not enabled by default in Windows Server 2012. In Post 1, I showed how to enable the payload using DISM. This time around, I’m going to show you how to enable .NET 3.51 using PowerShell. Now that Windows Server 2012’s Release Candidate is out (You mean you haven’t downloaded and installed it yet? Get to it!), you can see what the experience will pretty much look like by RTM.

The process is nearly identical as DISM. If your server is connected to the internet, it appears that the PS cmdlet will first try to grab the payload from there. This particular VM I was doing my tests in was not connected to the Internet, so I saw what is shown in Figure 1.

Failing to install the payload

Figure 1. Failing to install the payload with no connectivity

If you know you’re not connected and need to use the installation media (or just have it handy), Figure 2 shows that process.

Figure 2. Installing the payload successfully from media

 

An Update: Windows Server 2012, .NET Framework 3.51, and SQL Server

By: on May 14, 2012 in .NET Framework 3.51, .NET Framework 4.0, SQL Server 2012, Windows Server 2012, Windows Server 8

Back in March, I wrote a blog post entitled “Windows Server 8, SQL Server 2012, and .NET Framework” where I talked about the various versions of .NET Framework as they relate to SQL Server 2012, and how I encounteded that .NET 3.51 was not available by default in WIndows Server 2012 (then known as Windows Server 8). I filed a bug against this and the official word is out: it’s not changing (my bug was closed as “By Design”). Microsoft published a blog post today on this very topic – .NET 3.51 will be a Feature On Demand. And why are they still using Windows 8 and not Windows Server 2012? Arg.

I think this decision is myopic and boneheaded, considering that SQL Server is one of the biggest deployment scenarios for Windows Server 2012 (regardless of what version or versions of SQL will ultimately be supported on it). This adds complexity to a base Windows installation for a Windows Server 2012-based deployment. Yes, it’s just another check on a list to ensure is done, but a pretty major one.

While I showed you how to get the payload from the installation media and the new blog post walks through other ways to get it, in my opinion, it’s an even stupider assumption to make that servers will have internet connectivity. Many mission critical servers when installed do not and will not. That means Windows Update (aka WU) is an impossibility for many. So you’re back to my method of getting it from the install media.

Don’t like it?  I know I don’t. Make your voice heard. I have already tried the official route and was shot down, but I say there’s strength in numbers.  Maybe if there’s enough outcry Microsoft will change this by RTM … but don’t look for me to turn blue holding my breath.

EDIT: Here is a link to a Connect item. Please add your comments about your scenario and how it will affect you. Don’t just do a +1.

Windows Server 8, SQL Server 2012, and .NET Framework

By: on March 1, 2012 in .NET Framework 3.51, .NET Framework 4.0, SQL Server 2012, Windows Server 8

Hello everyone. If you haven’t heard, the Windows Server 8 Beta dropped today and boy, am I excited! It’s like a kid in a candy store. I’ll be doing a few blog posts on some of the changes as well as their impact on SQL Server. The first one I’m going to look at is .NET Framework which we all know is required for SQL Server deployments.

.NET Versions

.NET 3.51

.NET 3.51 is still required by SQL Server 2012 – even under Windows Server 8.

.NET 4.0

.NET 4.0 is a new requirement for SQL Server 2012.While .NET 4.0 is out of band with Windows Server 2008 and Windows Server 2008 R2 (meaning it shipped after the release of those OSes, so you need to install them separately), it is in band for Windows Server 8 since it ships with an early version of .NET 4.5. This means that you do not need to install .NET 4.0 separately and is already installed by default (see Figure 1 below). This will cut down the installation time for SQL Server 2012.

Installing and Troubleshooting .NET 3.51 Installations for SQL Server 2012 on Windows Server 8

If .NET 3.51 is not installed, SQL Server will detect this during Setup as shown in Figure 1. As you can see, SQL Server knows it needs to be enabled (“Windows feature(s) to be turned on:”), and will attempt to do so during the installation process.

.NET 3.51 Required

Figure 1. Setup showing .NET 3.51 needs to be installed, .NET 4.0 is already installed by default in Windows Server 8

Once you get through the configuration screens, Setup will start installing SQL Server. The status shown in Figure 2 is where .NET is attempted.

Setup installing .NET 3.51

Figure 2. Setup attempting to install .NET 3.51

So far, so good – right? Wrong! I ran into this:

Enabling .NET 3.51 failing

Figure 3. Houston – we have a problem.

Needless to say, this was not something I wanted to see. Delving into the verbose SQL Server Setup log file (detail.txt), I saw this:

[cc]

(01) 2012-03-01 01:19:48 Slp: Running Action: Install_DotNet35_Cpu64_Action
(01) 2012-03-01 01:19:48 Slp: Sco: File ‘D:x64setupx64dotNetFx35setup.exe’ does not exist
(01) 2012-03-01 01:19:48 Slp: Checkpoint: PREINSTALL_DOTNET35_CPU64_ACTION
(01) 2012-03-01 01:19:48 Slp: Enabling OS feature :NetFx3,  Dism Command: Dism /Online /Enable-Feature /FeatureName:NetFx3  /NoRestart  /Quiet  /All /LogPath:”C:Program FilesMicrosoft SQL Server110Setup BootstrapLog20120301_011037NetFx3.log”
(01) 2012-03-01 01:19:48 Slp: Running: Dism /Online /Enable-Feature /FeatureName:NetFx3  /NoRestart  /Quiet  /All /LogPath:”C:Program FilesMicrosoft SQL Server110Setup BootstrapLog20120301_011037NetFx3.log”
(19) 2012-03-01 01:24:42 Slp:
(19) 2012-03-01 01:24:42 Slp: Error: 0x800f0906
(19) 2012-03-01 01:24:42 Slp:
(19) 2012-03-01 01:24:42 Slp: The source files could not be downloaded.
(19) 2012-03-01 01:24:42 Slp: Use the /source option to specify the location of the files that are required to restore the feature. The file location should be either the root directory of a mounted image or a component store that has the Windows Side-by-Side directory as an immediate subfolder.
(01) 2012-03-01 01:24:42 Slp: Process returned -2146498298
(01) 2012-03-01 01:24:42 Slp: Failed to enable OS feature :NetFx3, result: -2146498298
(01) 2012-03-01 01:24:42 Slp: Watson Bucket 1
Original Parameter Values

(01) 2012-03-01 01:24:42 Slp: Parameter 0 : SQL Server 2012 RC0@RC@

(01) 2012-03-01 01:24:42 Slp: Parameter 3 : Microsoft.SqlServer.Configuration.SetupExtension.OSFeatureEnableFailureException@1428@1

(01) 2012-03-01 01:24:42 Slp: Parameter 4 : Microsoft.SqlServer.Configuration.SetupExtension.OSFeatureEnableFailureException@1428@1

(01) 2012-03-01 01:24:42 Slp: Parameter 5 : Install_DotNet35

(01) 2012-03-01 01:24:42 Slp: Parameter 7 : Microsoft.SqlServer.Configuration.SetupExtension.OSFeatureEnableFailureException@1@-2146498298

(01) 2012-03-01 01:24:42 Slp: Parameter 8 : Microsoft.SqlServer.Configuration.SetupExtension.OSFeatureEnableFailureException@1@-2146498298

(01) 2012-03-01 01:24:42 Slp:
Final Parameter Values

(01) 2012-03-01 01:24:42 Slp: Parameter 0 : SQL Server 2012 RC0@RC@

(01) 2012-03-01 01:24:42 Slp: Parameter 3 : 0x681D636F@1428@1

(01) 2012-03-01 01:24:42 Slp: Parameter 4 : 0x681D636F@1428@1

(01) 2012-03-01 01:24:42 Slp: Parameter 5 : Install_DotNet35

(01) 2012-03-01 01:24:42 Slp: Parameter 7 : 0x2F26F1A4

(01) 2012-03-01 01:24:42 Slp: Parameter 8 : 0x2F26F1A4

(01) 2012-03-01 01:24:44 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:Program FilesMicrosoft SQL Server110Setup BootstrapLog20120301_011037Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
(01) 2012-03-01 01:24:44 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:Program FilesMicrosoft SQL Server110Setup BootstrapLog20120301_011037Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
(01) 2012-03-01 01:24:44 Slp: Sco: Unable to open hklm registry key SOFTWAREMicrosoftMSSQLServer, error The system cannot find the file specified.
(01) 2012-03-01 01:24:44 Slp: Sco: Attempting to write hklm registry key Microsoft SQL Server to file C:Program FilesMicrosoft SQL Server110Setup BootstrapLog20120301_011037Registry_SOFTWARE_Wow6432Node_Microsoft_Microsoft SQL Server.reg_
(01) 2012-03-01 01:24:44 Slp: Sco: Attempting to write hklm registry key Uninstall to file C:Program FilesMicrosoft SQL Server110Setup BootstrapLog20120301_011037Registry_SOFTWARE_Wow6432Node_Microsoft_Windows_CurrentVersion_Uninstall.reg_
(01) 2012-03-01 01:24:44 Slp: Sco: Unable to open hklm registry key SOFTWAREWow6432NodeMicrosoftMSSQLServer, error The system cannot find the file specified.
(01) 2012-03-01 01:24:47 Slp: Error while enabling Windows feature : NetFx3, Error Code : -2146498298 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run setup again. For more information on how to enable Windows features , see http://go.microsoft.com/fwlink/?linkid=227143
(01) 2012-03-01 01:24:47 Slp: Watson bucket for exception based failure has been created
[/cc]

In other words, it failed because it couldn’t find the right “thing” to install .NET 3.51 from.

So how did I troubleshoot? It’s simple. There are a few ways to configure features in Windows. One of the easiest is to use the command line tool dism.

I first checked what was enabled (or not), and saw this:

Seeing feature statusFigure 4. There’s definitely a problem!

Note the state of NetFx3 (the feature you want to install) – “Disabled with Payload Removed”. Don’t panic – the fix is pretty simple. dism allows you to specify where to find that file if for some reason it isn’t in the OS. Assuming you have access to the installation media,use the /source option of dism to specify where to find the file. In this case, I was given a clue in detail.txt in this part “a component store that has the Windows Side-by-Side directory as an immediate subfolder”. In looking at the Windows Server 8 installation media, there was a sourcessxs folder. I plugged that in and viola! Success!Successful .NET 3.51 installFigure 5. Successful installation of .NET 3.51 by explicitly pointing to the source

Now when I run SQL Sever 2012’s Setup again, it reflects that .NET 3.51 is installed. I was able to get the instance installed and configured with no problems.

Ready to goFigure 6. .NET 3.51 installed – SQL Server should install just fine

So if you run into this issue with SQL Server 2012 and Windows Server 8, you’ll be able to fix it easily. Hope this helps some folks out there!