Wednesday, December 17, 2014

SQL Server 2012 install error enabling Windows Feature NetFx3

While setting up a new server I chose to install SQL Server 2012 instead of my usual install of SQL 2008 on Windows Server 2012 R2. I expected the install to complete successfully since I had done this many times before with SQL 2008. Murphy's law never fails though. Here I am looking at an install error instead!

 Error:
TITLE: Microsoft SQL Server 2012  Setup
——————————
The following error has occurred:
Error while enabling Windows feature : NetFx3, Error Code : -2146498298 , Please try enabling Windows feature : NetFx3 from Windows management tools and then run setup again.
So it wants me to install NetFx3. The requirement basically meant it needed .NET Framework 3.5. All I would need to do is run the following command from PowerShell:
Add-WindowsFeature NET-Framework-Core
This gave me an error as well!
Add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be downloaded.
When you run the following command at the PowerShell prompt, you will notice that not only the “Installed” state is set to “False” indicating it’s not installed but “InstallState” shows “Removed”:
Get-WindowsFeature Net-Framework-Core | FT name,install*
Name                                                             Installed                          InstallState
—-                                                                  ———                            ————
NET-Framework-Core                                False                                 Removed

What this means is that the standard install of Windows Server 2012 does not install the binaries required to enable the .NET features.

If you want to install this feature, run the following command;
Add-WindowsFeature NET-Framework-Core -Source D:\sources\sxs

This assumes D is your CD drive which has Windows Server 2012 installation media.

NOTE: This won’t work if you ran Windows Update and applied patches after installing Windows Server 2012 and before trying to install SQL Server 2012.

No comments:

Post a Comment