SQL Server 2005 Cumulative Update or GDR fails when trying to rename the mssqlsystemresource files

I’ve seen a few customers run in to this recently when the resource database is in a different location than the master database.  A cumulate update or GDR for SQL Server 2005 may fail with the following for the SQL Server Database Services 2005 in the Summary_%.txt log file.  Look for the latest summary_%.txt file in the C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfix folder.

 **********************************************************************************
Product Installation Status
Product : SQL Server Database Services 2005 (MSSQLSERVER)
Product Version (Previous): 4035
Product Version (Final) :
Status : Failure
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGHotfixSQL9_Hotfix_KB970892_sqlrun_sql.msp.log
Error Number : 29538
Error Description : MSP Error: 29538 SQL Server Setup did not have the administrator permissions required to rename a file: E:DATAmssqlsystemresource1.ldf. To continue, verify that the file exists, and either grant administrator permissions to the account currently running Setup or log in with an administrator account. Then run SQL Server Setup again.

Note that the error indicates setup was not able to rename a file related to the system resource database.  If you bring up the referenced log file, this will give you more details about why this happened.  In this example the SQL9_Hotfix_KB970892_sqlrun_sql.msp.log had the following additional information:

Failed to copy file "E:DATAmssqlsystemresource.ldf" to "E:DATAmssqlsystemresource1.ldf". Error 2
Failed to copy file "E:DATAmssqlsystemresource.mdf" to "E:DATAmssqlsystemresource1.mdf". Error 2
Failed to copy file "E:DATAdistmdl.ldf" to "E:DATAdistmdl1.ldf". Error 2
Failed to copy file "E:DATAdistmdl.mdf" to "E:DATAdistmdl1.mdf". Error 2

In this case the actual error was Error 2, which is “The system cannot find the file specified.”  This will happen if system Resource database is in a different location than the master database.  To resolve, use the steps outlined in the topic “Moving System Databases” and the section titled “Moving the master and Resource Databases” https://msdn.microsoft.com/en-us/library/ms345408(SQL.90).aspx.

    • Since your master database is already in the desired location, you can start at step 7 in the “Moving the master and Resource Databases” section to finish up moving the Resource database to the same location as master.

For the distmdl related files, you can just create two empty(dummy) files from notepad and save them as distmdl.mdf and distmdl.ldf in the location that is referenced in the error message.  In this example, we created dummy E:DATAdistmdl.ldf and E:DATAdistmdl.mdf.

Sarah Henwood | Microsoft SQL Server Escalation Services