Microsoft KB Archive/918693

= Error message when you install SQL Server Express Edition Service Pack 1 or SQL Server 2005 Express Edition with Advanced Services: &quot;SQL Server Setup did not have the administrator permissions required to rename a file&quot; =

Article ID: 918693

Article Last Modified on 3/16/2007

-

APPLIES TO


 * Microsoft SQL Server 2005 Express Edition
 * Microsoft SQL Server 2005 Express Edition with Advanced Services

-



Bug #: 430698 (SQLBUDT)



SYMPTOMS
When you install Microsoft SQL Server 2005 Express Edition Service Pack 1 (SP1) or SQL Server 2005 Express Edition with Advanced Services on an instance of SQL Server 2005 Express Edition, you receive an error message that resembles the following:

SQL Server Setup did not have the administrator permissions required to rename a file: c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\mssqlsystemresource1.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.



CAUSE
This problem occurs because a user instance is running when you install SQL Server 2005 Express Edition SP1 or SQL Server 2005 Express Edition with Advanced Services.

When the Setup program tries to rename the Mssqlsystemresource1.mdf file to Mssqlsystemresource.mdf, the rename attempt fails. This behavior occurs because the user instance is using the original copy of the Mssqlsystemresource.mdf file.

Note Even if you stop the parent instance of SQL Server Express Edition, you still experience this problem because the user instance is a separate instance of SQL Server Express Edition and is still running.



WORKAROUND
To work around this problem, follow these steps:  Start the Sqlcmd utility (Sqlcmd.exe) at a command prompt, and then connect to the parent instance of SQL Server Express Edition.  Disable user instances by using the following statement: EXEC sp_configure ‘user instances enabled’,0

GO

RECONFIGURE

GO   Determine the pipe name of any active user instances by running the following statement: SELECT owning_prinicipal_name, instance_pipe_name FROM sys.dm_os_child_instances WHERE heart_beat = ‘alive’

GO   Connect to each listed user instance, and then shut each user instance down by using the following statement: sqlcmd -S np:

GO

SHUTDOWN WITH NOWAIT;

GO Note  represents the name of the named pipe that you determine in step 3.  Reinstall SQL Server 2005 Express Edition SP1 or SQL Server 2005 Express Edition with Advanced Services. Connect to the parent instance of SQL Server Express Edition by using the Sqlcmd utility.</li>  Re-enable the user instances by using the following statement: EXEC sp_configure ‘user instances enabled’,1

GO

RECONFIGURE

GO </li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="references_section">