Windows Server 8, SQL Server 2012, and .NET Framework
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.
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.
Figure 2. Setup attempting to install .NET 3.51
So far, so good – right? Wrong! I ran into this:
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:
Figure 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!Figure 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.
Figure 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!
Hello Sir/Madam, I got the same problem while installing SQL Server 2012 Express with tools(64-bit) on my windows 8 consumer preview OS. Then, I used the solution which you explained here. It worked for me perfectly. Thank you very much.
Regards,
Jamal.
Glad it helped you!
Great and timely post Allan. Just what I needed as I was having exactly the same error during my SQL 2012 install.
Thanks.
Glad you found it useful.
For the impatient amongst us (like me) the install seems to sit at the “Enabling OS feature ‘NetFx3′” for a very long time when run on a Windows 8 Preview machine. I’ve got 6GB of memory and four 64 bit cores at my disposal and yet had to wait around 15 minutes at this stage. I was about to despair and kill the install when it kicked into life and installed successfully 🙂
Hi Allan,
Sometimes some little forgotten details [mind do sometimes forget…]
can often make a difference in an installation process.
I tried to install SQL Server 2102 RTM on Windows 8 PR and encountered the very same issue.
The installation process stalled at the Enabling OS NetFx3 stage.
I checked in
-Programs and Features,
-choosing Turn Windows features on or off option,
-and noticed Microsoft .NET Framework 3.5.1 option was left unchecked… Hmmmm…
I could have tried to download the missing files from the Web
though I found running the following Dism line command in the cmd prompt [Run as an Administrator] much faster.
Dism /online /enable-feature /featurename:NetFx3 /All /Source:x:sourcessxs /LimitAccess
[where x refers to the drive of the DVD I used for installing Windows 8 PR.]
I then repeated the SQL Server 2012 RTM process.
and voila…The message I wanted to see:
Your SQL Server 2012 installation completed sucessfully…
So I can confirm your prescribed solution works and does indeed make a big difference.
Thank’s
“Server 8 installation media, there was a sourcessxs folder. I plugged that in and viola! Success!”
I did none of that since I wasin a virtual machine so I just Went to Control panelinstalled programs}windows features and enabled .net 3.5. Reinstall and voila 🙂
If you don’t have the media Windows Server 2012 will try to connect to the internet, so it got downloaded. Otherwise, you need the media.
Worked like a charm on Windows 8…thanks!
Super – thanks a lot.
Just tried your solution while installing sql server 2012 on a windows 8 Pro build 9200 and ¡worked perfectly! ¡thanks!
Great Post Allan! Definately saved a few hours for me.
Hi Allen,
I was finding the same problem with NetFx,i followed all the steps you said,but its not enabling completely. 60.4% it got enable.
thank you so much .
Dism /online /enable-feature /featurename:NetFx3
/All /Source:d:sourcessxs
//very useful in winsever2012
thank you.
Not sure why it didn’t work for you. However at this point you should be using either Add-WindowsFeature or Install-WindowsFeature and transition to PowerShell. It’s much easier … and the way of the future!
thank you so much .
Hi,
I tried all the above in windows 2012 server Build 9200. But no luck. When I start the dism command from the command prompt it starts installing the feature and at 66.3 % it is failing and providing me with a log.
Remember that you need to have the install media, so point the path to the right place. It may not be D:sourcessxs for you.
I fixes for me like:
– Insert win2012 installation desk.
– Rum PowerShell as administrator and.
– Execute the following command: http://www.sqlha.com/2012/03/01/windows-server-8-sql-server-2012-and-net-framework/
It run for 3-4 mints got the msg like: The operation completed successfully.
Again started SQL Server installtion (without reboot)
All went good. 🙂
If you’re using PowerShell, you should use http://www.sqlha.com/2012/06/01/part-2-windows-server-2012-sql-server-2012-and-net-framework-powershell/
correct command
dism /online /enable-feature /featurename:netfx3 /all /source:d:sourcessxs
Pingback: Installing Windows Server 8 & SQL Server 2012 : Resource for Software Development
Dosent work. Tried it on 6 servers. 2 2012 R2 and 4 2012. Tried DISM tried Powershell. I have to install SQl on one of these servers and none will take Framework 3.5. Any other suggestions for soneone who really has the problem?
I run the powershell command all the time http://www.sqlha.com/2012/06/01/part-2-windows-server-2012-sql-server-2012-and-net-framework-powershell/. Always works 100% of the time for me – and I’ve been doing it now for about 2 years.
If it’s not working check things like permissions and such because I run this quite often.
It worked for me. Thanks very much
Pingback: Ding, Dong - SQL Server's Dependency on .NET Framework 3.5x is Dead - SQLHA