Error message when you install SQL Server Express Edition Service Pack 1 or SQL Server 2005 Express Edition with Advanced Services: "SQL Server Setup did not have the administrator permissions required to rename a file" (918693)



The information in this article 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:
  1. Start the Sqlcmd utility (Sqlcmd.exe) at a command prompt, and then connect to the parent instance of SQL Server Express Edition.
  2. Disable user instances by using the following statement:
    EXEC sp_configure 'user instances enabled',0
    GO
    RECONFIGURE
    GO
  3. 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
  4. Connect to each listed user instance, and then shut each user instance down by using the following statement:
    sqlcmd -S np:<Pipe>
    GO
    SHUTDOWN WITH NOWAIT;
    GO
    Note <Pipe> represents the name of the named pipe that you determine in step 3.
  5. Reinstall SQL Server 2005 Express Edition SP1 or SQL Server 2005 Express Edition with Advanced Services.
  6. Connect to the parent instance of SQL Server Express Edition by using the Sqlcmd utility.
  7. Re-enable the user instances by using the following statement:
    EXEC sp_configure 'user instances enabled',1
    GO
    RECONFIGURE
    GO

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

REFERENCES

For more information about user instances in SQL Server Express, visit the following Microsoft Developer Network (MSDN) Web site: For more information about the SHUTDOWN statement, visit the following MSDN Web site: For more information about the sys.dm_os_child_instances view, visit the following MSDN Web site:

Modification Type:MajorLast Reviewed:5/17/2006
Keywords:kbsql2005setup kbsql2005express kbExpertiseAdvanced kbtshoot kbprb KB918693 kbAudDeveloper kbAudITPRO