Blog

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!


26 Responses

  1. JAMAL says:

    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.

  2. Allan says:

    Glad it helped you!

  3. Rick Backus says:

    Great and timely post Allan. Just what I needed as I was having exactly the same error during my SQL 2012 install.
    Thanks.

  4. Dave Billingham says:

    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 🙂

  5. DCHAMBERLAND says:

    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

  6. Magnus Karlsson says:

    “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 🙂

  7. MJ Hufford says:

    Worked like a charm on Windows 8…thanks!

  8. Roger Bossard says:

    Super – thanks a lot.

  9. Erick Garcia says:

    Just tried your solution while installing sql server 2012 on a windows 8 Pro build 9200 and ¡worked perfectly! ¡thanks!

  10. Mohammed says:

    Great Post Allan! Definately saved a few hours for me.

  11. Indushree says:

    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.

  12. peter peng says:

    thank you so much .

    Dism /online /enable-feature /featurename:NetFx3
    /All /Source:d:sourcessxs
    //very useful in winsever2012

    thank you.

    • Allan says:

      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!

  13. Kanishka says:

    thank you so much .

  14. Diwaka says:

    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.

  15. Deepak says:

    I fixes for me like:
    – Insert win2012 installation desk.
    – Rum PowerShell as administrator and.
    – Execute the following command: https://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. 🙂

  16. Deepak says:

    correct command
    dism /online /enable-feature /featurename:netfx3 /all /source:d:sourcessxs

  17. […] SQL Server 2012 RC0. Remembering my trials with an earlier preview of Windows 8, and after reading Allan Hirt’s blog post, I knew that I would have to manually install .NET Framework 3.5 in order to install SQL Server […]

  18. Randy Miller says:

    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?

  19. AbdulRahman says:

    It worked for me. Thanks very much

  20. […] 3.5x on Window Server 2012 or later is not apparent to everyone. I even wrote two blog posts (one and two) on how to get this task done. There is also a lot of confusion on why the older .NET […]

Leave a Reply