Failing to patch a clustered SQL 2008 R2 instance

This article discusses the installation on SP1 but it applies to Cumulative Updates as well.

Well this is nice. I was just installing a new System Center 2012 full environment and wanted to use a SQL Cluster. After creating the cluster and installing 2 cluested instances of SQL Server 2008 R2, I also wanted to apply Service Pack 1 for SQL 2008 R2.

No trouble at all right? Well not this time - the SQL SP1 upgrade installer failed. The upgrade log:

C:\ Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\<latest_install_attemp>\<instance_name>\ Summary.txt

had the following information about the error:

 Overall summary: 
 Final result: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files. 
 Exit code (Decimal): -595541211
 Exit facility code: 1152
 Exit error code: 49957
 Exit message: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files. 
 Start time: <datetime> 
 End time: <datetime> 
 Requested action: Patch
 Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\<latest_install_attemp>\<instance_name>\Detail.txt
Exception help link: <some_encoded_link_here> 

Oh ... so it's exit code -595541211 with exit facility code 1152 and exit error code 49957 !!! Well ... then it's all clear now ... O_o

Well not really now is it? So, let's dig in a little deeper here, from the information above we can see that we have another log file which seems more detailed judging by its name.

So now we are opening this log file here C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\<latest_install_attemp>\<instance_name>\ Detail.txt and this is what we can see in it:

 SQLEngine: : Entering ConfigureSQLEngineResourceType
SQLEngine: : Checking Engine checkpoint 'SQLCluster_ConfigureResourceType' 
SQLEngine: : The source DLL file exists = 'True'. 
SQLEngine: : Type 'SQL Server' exists and DLL is installed ... 
SQLEngine: : Type 'SQL Server' has 1 resources. Performing upgrade ... 
SQLEngine: : The source DLL file is 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.<instance_name>\MSSQL\Binn\SQSRVRES.DLL' and the target is 'C:\Windows\system32\SQSRVRES.DLL'. 
SQLEngine: : File versions : ['c:\Program Files\Microsoft SQL Server\MSSQL10_50.<instance_name>\MSSQL\Binn\SQSRVRES.DLL':2009.2009.2500.0], ['C:\Windows\system32\SQSRVRES.DLL':2009.2009.1600.1]. 
SQLEngine: : Upgrading resource type 'SQL Server' using resource for instance '<instance_name>' as reference ... 
Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC. 
Slp: The RPC server is unavailable
Slp: The configuration failure category of current exception is ConfigurationFailure
Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC. 
Slp: System.ComponentModel.Win32Exception: The RPC server is unavailable
Slp: at Microsoft.SqlServer.Configuration.Cluster.ClusterResource.UpgradeResourceDLL(String nodeName, String dllPathName) 
Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SQLEngineClusterFeature.UpgradeResourceDLL(SQLServiceResource sqlResource) 
Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SQLEngineClusterFeature.ConfigureSQLEngineResourceType() 
Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.Patch_ConfigRC(EffectiveProperties properties) 
Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.Patch(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb) 
Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId) 
Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream) 
Slp: Exception: System.ComponentModel.Win32Exception. 
Slp: Source: Microsoft.SqlServer.Configuration.Cluster. 
Slp: Message: The RPC server is unavailable. 
Slp: Watson Bucket 1 

Well then this is sort of starting to make some kind of sense. Judging by the action it was performing, the exception message and the stack trace it seems that it is failing to update this file:

C:\Program Files\Microsoft SQL Server\MSSQL10_50.<instance_name>\MSSQL\Binn\SQSRVRES.DLL

So I thought to myself - OK, so what would happen if I copy this file manually over and try to run the upgrade process again?

Copied the file SQSRVRES.DLL from C:\Program Files\Microsoft SQL Server\MSSQL10_50.<instance_name>\MSSQL\Binn\ to C:\Windows\System32\ and started the upgrade of SP1 again.

SUCCESS !!! :)