SQL Server Installation Failed Due to Pending Restart of Server?

Incidentally, the sort of problem I’m discussing here is why I (almost) always copy the patch/servicepack/media to somewhere local – each time you run a servicepack or cumulative update, the whole package decompresses to your hard drive, runs, and then deletes itself afterwards – not something that you want to wait for several times…

Patching some SQL Servers today, I had a couple of failures because there was a reboot pending (presumably a hangover from the Windows patching that had gone before).

Reboot the server, restart the installation, and get the message again. Swear. Remember there’s a registry key value you can rename to bypass these checks. (It’s “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations” – rename it to, say, PendingFileRenameOperationsBackup and have another go. Remember to change it back when you’re done.)

Except in this case, there was nothing there… The key value didn’t exist. Or if it did, I couldn’t see it, which is a bit awkward as I’m supposed to be administering these servers. muttermutter Anyway.

If you’re running a normal SQL Server setup, you can do a lot from the command line – and this is all documented elsewhere, and I’m not going to rehash it.

However, as mentioned at the top (you did read the small print, yes?), the typical service pack / cumulative update / hotfix is distributed as a self-extracting executable, called something like SQLServer2014-KB4032541-x64.exe that launches something else.

Fortunately, if you run your executable with the /? parameter, you’ll get a helpful list of what parameters you can pass into the service pack:

C:\<<somepath>>\ >SQLServer2014-KB4032541-x64.exe /?
Microsoft (R) SQL Server 2014 12.00.5000.00
Copyright (c) Microsoft Corporation.  All rights reserved.
setup.exe /[option]={value} /[option]={value} ...
ACTION                       Specifies a Setup work flow, like INSTALL,
                              UNINSTALL, or UPGRADE. This is a required
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
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
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...

However, nothing here is immediately helpful. But then there’s this post that talks about the repeated-reboot-pending-failure for a standard SQL Server setup, and I found myself wondering if you could use the same undocumented /SkipRules parameter with a value of “RebootRequiredCheck”.

C:\<<somepath>>\ >SQLServer2014-KB4032541-x64.exe /action=Patch /SkipRules=RebootRequiredCheck

You can. No reboot check performed. Patching can continue. Hurrah.


Undocumented parameters are undocumented. Which means they’re not supported. You have been warned.

This entry was posted in SQLServerPedia Syndication and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.