SQLServer2014SP2-KB3171021-x64-ENU.exe /Quiet /IAcceptSQLServerLicenseTerms /Action=Patch /AllInstances
Long story short, you should reboot the server twice, before and after running the command.
Thanks,
Hiram
If you want to keep reading, keep going.
The installation summary file can be found here, which you can double check the status of the update:
C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\Summary.txt
First time I tried this, the cmd shell closes very fast and I couldn’t apply the update because the command shell was erroring with exit message: “A computer restart is required.” Meaning, there was a reboot pending before the update can be installed.
With a quick finger on the PrintScreen key, I was able to capture the command shell message. Alternatively, you can run psr.exe (Steps Recorder) and hit record.
Ran “shutdown /f /r /t 00” to reboot right away, but here is the top contents of the Summary.txt Log File: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\Summary.txt
Overall summary: Final result: Passed but reboot required, see logs for details Exit code (Decimal): -2067919934 Exit facility code: 1214 Exit error code: 3010 Exit message: A computer restart is required. You must restart this computer before installing SQL Server. Start time: 2017-02-01 17:06:42 End time: 2017-02-01 17:07:10 Requested action: Patch
After rebooting, I retired initial command above.
The SQL2014 SP2 update installs successfully but doesn’t actually apply. My server instance still showed 12.0.4100.1. The cmd shell message said:
For sanity, I tried bouncing the SQL services installed to see if the build reflects changed but no dice. If you need the net stop & net start cmds I ran here they are:
Note: Powershell cmdlet Restart-Service does the same thing, but I like the stop/start controlled method and since I was already in cmd shell, heck why not use NET STOP & NET START cmds.
NET STOP SQLSERVERAGENT NET STOP MSSQLSERVER NET STOP sqlbrowser NET STOP MSSQLFDLauncher NET STOP "MsSqlServerOlapService" NET STOP "ReportServer" NET STOP MsDtsServer120 NET START "MsSqlServer" NET START "SQL Server Agent (MsSqlServer)" NET START MsDtsServer120
After bouncing the services the SQL instance still showed build 12.0.4100.1. I proceeded to reboot, Start, Power, Restart (Reason: Application Maintenance). When the server came back online the new SQL Server build reflected SQL2014SP2 version 12.0.5000.0. Done!
Checked the top contents of the Summary.txt Log File: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\Summary.txt
Overall summary: Final result: Passed Exit code (Decimal): 0 Start time: 2017-02-01 18:50:32 End time: 2017-02-01 18:55:02 Requested action: Patch Instance MSSQLSERVER overall summary: Final result: Passed Exit code (Decimal): 0 Start time: 2017-02-01 18:51:14 End time: 2017-02-01 18:54:59 Requested action: Patch Just as an advice, when doing this for previous projects always check post the update for active connections from applications, and rerun any missed SQL Jobs that might have been halted or missed during the servicing. If you don't use the silent method above (/QUIET switch) the UI will service the SQL Server instance for a few minutes (meaning SQL services will restart) while the update actually applies and the instance will reflect the new build right away. An interesting option I'd like to see in action is /CLUSTERPassive. If you want to see all the options here they are or you can run the help on your own. C:\Users\hiramf\cd Downloads C:\Users\hiramf\Downloads\SQLServer2014SP2-KB3171021-x64-ENU.exe /? Microsoft (R) SQL Server 2014 12.00.5000.00 Copyright (c) Microsoft Corporation. All rights reserved. Usage: setup.exe /[option]={value} /[option]={value} ... Options: ACTION Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. ALLINSTANCES Specifies that all instances are to be included in the Setup operation. This parameter is supported only when applying a patch. CLUSTERPASSIVE Specifies that SQL Server Setup should not manage the SQL Server services. This option should be used only in a non-Microsoft cluster environment. ENU Use the /ENU parameter to install the English version of SQL Server on your localized Windows operating system. ERRORREPORTING Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature. HELP Displays the command line parameters usage IACCEPTSQLSERVERLICENSETERMS By specifying this parameter and accepting the SQL Server license terms, you acknowledge that you have read and understood the terms of use. INDICATEPROGRESS Specifies that the detailed Setup log should be piped to the console. INSTANCEID Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance. INSTANCENAME Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS). QUIET Setup will not display any user interface. QUIETSIMPLE Setup will display progress only, without any user interaction. SQMREPORTING Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature. UIMODE Parameter that controls the user interface behavior. Valid values are Normal for the full UI,AutoAdvance for a simplied UI, and EnableUIOnServerCore for bypassing Server Core setup GUI block. X86 Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. Press any key to exit...
For reference:
- If you need to check Build Numbers my favorite place is here: http://sqlserverbuilds.blogspot.com/
- If you need to download the update file my favorite place is here: https://www.microsoft.com/en-us/download/details.aspx?id=53168
Thanks,
Hiram