Installing SQL Server 2016 RTM? You must do this!
Arvind Shyamsundar, Lee Woods
Reviewed by Jeff Papiez, Mike Weiner, Troy Moen, Suresh Kandoth
It has been a while now since SQL Server 2016 has been generally available. We trust you are excited with the great capabilities that SQL Server 2016 brings to you, and have either already installed or will be installing it soon.
Critical Visual C++ Runtime Update
At this time, we want to remind you of a critical Microsoft Visual C++ 2013 runtime pre-requisite update that may be* required on machines where SQL Server 2016 will be, or has been, installed. Installing this, via either of the two methods described below, will update the Microsoft Visual C++ 2013 runtime to avoid a potential stability issue affecting SQL Server 2016 RTM.
* You can determine if an update is required on a machine via one of the two methods below:
- Select View Installed Updates in the Control Panel and check for the existence of either KB3164398 or KB3138367. If either is present, you already have the update installed and no further action is necessary.
- Check if the version of %SystemRoot%\system32\msvcr120.dll is 12.0.40649.5 or later. If it is, you already have the update installed and no further action is necessary. (To check the file version, open Windows Explorer, locate and then right-click the %SystemRoot%\system32\msvcr120.dll file, click Properties, and then click the Details tab.)
Obtaining the critical update
As described in KB3164398 and in the SQL 2016 Release notes, there are three methods to obtain the fix for the Microsoft Visual C++ 2013 runtime if required:
- The quickest and simplest method is to install the update provided by Visual Studio, KB3138367 - Update for Visual C++ 2013 and Visual C++ Redistributable Package. This will mitigate the potential SQL Server 2016 stability issue and negate the need for applying the alternative (and much larger) SQL Server 2016 update described below. Applying KB3138367 can be performed before, or after, SQL Server 2016 has been installed on a machine. KB3138367 is available on the Microsoft Download Center.
- You can alternatively choose to update the Microsoft Visual C++ 2013 runtime using an update provided by SQL Server, KB3164398 - Critical update for SQL Server 2016 MSVCRT prerequisites. KB3164398 is available via several channels as described in the KB article.
- The updated Visual C++ 2013 runtime binaries are also included in SQL Server 2016 RTM Cumulative Update #1 (CU1). You can optionally download CU1 rather than KB3164398 and utilize the UPDATESOURCE method described above to receive other valuable product updates also included in CU1 and subsequent CUs.
If you determine the update is required on a machine where SQL Server 2016 will be installed, and select to apply KB3164398 via method 2 above, you have the option to download the update and have it applied as part of the installation without internet connectivity present.
This blog post details the steps to integrate KB3164398 when you install SQL Server 2016 RTM installation on a computer with no access to the Internet (a.k.a. offline install.)
Step 1: Download, but do not execute, the KB3164398 update package
Download the correct file (SQLServer2016-KB3164398-x64.exe) from the Microsoft Download Center link mentioned in the KB article 3164398.
For example, let’s say that you downloaded the SQL installation media to C:\temp\SQL2016_GDR.
Step 2: Execute SQL Server 2016 RTM setup.exe from the command line and include the /UPDATESOURCE parameter
This step is where we ‘tell’ SQL 2016 RTM setup.exe to incorporate (slipstream) the now accessible KB3164398 update into the desired installation or upgrade without internet connectivity. To do this, we must use the /UPDATESOURCE parameter to RTM setup.exe from an administrative command prompt:
The important thing to note above is the /ACTION parameter. Failure to specify a valid action will cause the /UPDATESOURCE parameter to be ignored. Typical valid values for the /ACTION parameter include the following:
- Install (to install a new standalone instance of SQL Server 2016)
- Upgrade (to upgrade an existing instance to SQL Server 2016)
- InstallFailoverCluster (to install a failover clustered instance of SQL Server 2016)
The documentation page Install SQL Server 2016 from the Command Prompt has more details on these switches. Additionally, Installing Updates from the Command Prompt further details the UPDATESOURCE method of including updates in new installations or upgrades.
If this command line is correct, SQL Server 2016 Setup will detect the KB3164398 update and list it in the ‘Product Updates’ screen as shown below:
In subsequent screens, you will see the ‘Extract Setup files’ step below will have an ‘In Progress’ status. That means that the update package is being extracted and will be installed.
Skipping forward to the last ‘Ready to Install’ screen, you will observe that the ‘Product Update’ section (as highlighted in the below screenshot) has the properties as below.
Step 3: Validate the version of the Visual C++ 2013 runtime loaded by SQL Server 2016
To validate that the correct version of the VC++ runtime has now been installed and loaded, execute the following query using SQL Server Management Studio or SQLCMD:
SELECT name, file_version
FROM sys.dm_os_loaded_modules
WHERE name like '%msvcr120.dll%'
The version should be 12.0:40649.5. If that checks out, then you are good to go! If it does not, you are most likely missing a reboot. Did you skip that reboot when prompted by setup?
Step 4: Validate the update has been applied
You may also validate successful installation of the update in the new instance by executing:
SELECT @@VERSION
Given the various options described above, please note the following:
- If you had simply installed KB3138367 (Method 1 described in the 'Obtaining the critical update' section), then the version number for SQL Server will remain at 13.0.1601.5.
- If you followed Method 2, the output of SELECT @@VERSION will be as shown below. Notice the RTM-GDR keyword, which tells you that the GDR update has been applied:
Microsoft SQL Server 2016 (RTM-GDR) (KB3164398) - 13.0.1708.0 (X64)
- If you followed Method 3 and used CU1, the output of SELECT @@VERSION would return the below. The RTM-CU1 clearly indicates that the SQL engine has been updated to CU1.
Microsoft SQL Server 2016 (RTM-CU1) (KB3164674) - 13.0.2149.0 (X64)
We hope these steps clarify the method of integrating the critical update for Microsoft Visual C++ runtime with SQL Server 2016 setup. In case of any questions, please leave your Comments below!
Comments
- Anonymous
August 01, 2016
Will you be updating the installer to eliminate this manual update anytime soon?- Anonymous
August 01, 2016
Hi Chris, the installer will automatically detect these updates provided the computer where the installer is running has access to the Internet. But as we all know, that is far from the case in the real world. Till such time that we release a 'slip-streamed' installation package (no firm plans on this as yet) we need to follow the steps in this blog post for the cases where the installation is running on an 'offline' computer.
- Anonymous
- Anonymous
August 26, 2016
Hi Arvind, the Azure gallery image for SQL 2016 is the RTM build. Can you please help get the gallery image get replaced with the CU1 build which remedies this issue? Thank you.- Anonymous
September 08, 2016
I checked the images. The version of the MSVCRT DLL are already updated for these. You can double-check this by running the query below:select * from sys.dm_os_loaded_modules where name like '%msvcr120%'The file_version for MSVCR120.DLL (the critical one for this issue) has already been updated to 12.0:40649.5.
- Anonymous
- Anonymous
September 12, 2016
When I use /UpdateSource with CU1 to install SQL Server 2016 for the first time the install breaks due to msiexec.exe initiating a restart. The Log would say " Comment: The Windows Installer initiated a system restart to complete or continue the configuration of 'SQL Server 2016 Integration Services'."This only happens with CU1, anybody else experiencing the same?- Anonymous
November 02, 2016
I have the same problem with a mid-install reboot happening due to SSIS. Did you ever find an answer to this?- Anonymous
January 05, 2017
Hi Dokier and Charlie! This issue is on topic, but unfortunately, there is a lot of context that would need to be dug into, before a solution could be offered.Could you ask in our SQL Server Setup & Install forum? https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlsetupandupgradeAnd you can submit feedback to the SQL Server team here: https://connect.microsoft.com/SQLServer/FeedbackThanks! - Anonymous
January 19, 2017
Hi Charlie, Sorry I just noticed your comment here, something I tried and seemed to work was disabling & stopping McAfee Antivirus services prior installing, after installation was completed I would just enable it back. Still I don't know how the antivirus relates to SSIS and the error log we encountered. Let me know if that helped you too.
- Anonymous
- Anonymous