Microsoft KB Archive/935371

= Error message when you install SQL Server 2005 SP2, SQL Server Express SP2, or SQL Server Express with Advanced Services SP2: &quot;SQL Server Setup failed to execute a command for server configuration. CREATE DATABASE failed&quot; =

Article ID: 935371

Article Last Modified on 5/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2005 Service Pack 2
 * Microsoft SQL Server 2005 Express Edition
 * Microsoft SQL Server 2005 Express Edition with Advanced Services

-



SYMPTOMS
When you install Microsoft SQL Server 2005 Service Pack 2 (SP2), SQL Server 2005 Express Edition (SQL Server Express) SP2, or SQL Server Express with Advanced Services SP2, you receive the following error message:

SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft] [SQL Native Client] [SQL Server] CREATE DATABASE failed. Some File names listed could not be created. Check related errorrs.. Refer to the server error logs and Setup logs for detailed error information.

Note In this error message, &quot;errorrs&quot; is a misspelling of the word &quot;errors.&quot; Also, the sentence &quot;Check related errorrs..&quot; has two period (.) characters.

Additionally, you experience one of the following symptoms.

Symptom 1
When you perform a new installation of SQL Server Express SP2 or of SQL Server Express with Advanced Services SP2, the following error message is logged in the SQLSetup0001_ _SQL.log file:

SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft] [SQL Native Client] [SQL Server]Incorrect syntax near '='.

[SQL Server]Cannot dump ##MS_AgentSigningCertificate##. SYSDBUPG.SQL terminating.

This problem occurs if the length of the installation path exceeds 58 characters.

Symptom 2
When you install SQL Server Express SP2 or SQL Server Express with Advanced Services SP2 on an existing instance of SQL Server Express, the following error messages is logged in the SQLSetup0001_ _SQL.log file:

SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][SQL Native Client][SQL Server]CREATE DATABASE failed. Some file names listed could not be created. Check related errors.. Refer to the server error logs and Setup logs for detailed error information.

Note In this error message, the sentence &quot;Check related errors..&quot; has two period characters.

This problem occurs if the length of the installation path exceeds 58 characters.

Symptom 3
When you install SQL Server 2005 SP2 on an existing instance of SQL Server 2005 Service Pack 1 (SP1) or on an existing instance of the original release version of SQL Server 2005, the following error message is logged in the SQL9_Hotfix_KB921896_Sqlrun_Sql.msp.log file:

[SQL Server]Incorrect syntax near '='.

[SQL Server]Cannot dump ##MS_AgentSigningCertificate##. SYSDBUPG.SQL terminating.

This problem occurs if the length of the installation path exceeds 128 characters.



CAUSE
This problem occurs because the script in the Sysdbupg.sql file contains the following code to escape quotations in a file name. SELECT @certificate_name = QUOTENAME(@certificate_name, ) The QUOTENAME function returns null if the length of the input value exceeds 128 characters. The longer path name triggers an error in the script.



WORKAROUND
To work around this problem, use one of the following methods:
 * Specify an installation path that is less than 58 characters long when you install SQL Server Express SP2 or SQL Server Express with Advanced Services SP2.
 * Specify an installation path that is less than 128 characters long when you install SQL Server 2005 SP2.

However, if you must use an installation path that exceeds the character limit, you can use one of the following workarounds. Use the workaround that corresponds to the symptom that you are experiencing.

Workaround for symptom 1
To work around this problem, follow these steps:  In a text editor such as Notepad, open the Sysdbupg.sql file. This file is located in the following folder:

\MSSQL.1\MSSQL\Install

Note  represents the installation path.  Locate the following line of code. SELECT @certificate_name = QUOTENAME(@certificate_name, )   Replace the line of code that you located in step 2 with the following line of code. SELECT @certificate_name = ' + REPLACE(@certificate_name, ', ''') + '  Save the change, and then exit the editor. In the error message dialog box, click Retry.

If you have canceled the installation process, follow these steps:
 * 1) Use Add or Remove programs to remove SQL Server Express SP2 or SQL Server Express with Advanced Services SP2.
 * 2) Delete the files in the installation folder.
 * 3) Reinstall SQL Server Express SP2 or SQL Server Express with Advanced Services SP2.
 * 4) When you receive the error message, follow the steps in the previous procedure.

Workaround for symptom 2
To work around this problem, reinstall SQL Server Express SP2 or SQL Server Express with Advanced Services SP2 on the existing instance of SQL Server Express.

Workaround for symptom 3
To work around this problem, update the Sysdbupg.sql file. To do this, follow steps 1 through 4 in the &quot;Workaround for symptom 1&quot; section. Then reinstall SQL Server 2005 SP2.



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

Keywords: kbtshoot kbinfo kbprb KB935371

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.