Microsoft KB Archive/264123

= PRB: SQL Server 7.0 Service Pack Installation Fails with an Error Message When a Script File Is Run =

Article ID: 264123

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft SQL Server 7.0 Service Pack 4
 * Microsoft SQL Server 7.0 Service Pack 2
 * Microsoft SQL Server 7.0 Service Pack 3

-



This article was previously published under Q264123



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
When you try to install SQL Server 7.0 Service Pack 2 (SP2), Service Pack 3 (SP3), or Service Pack 4 (SP4) the installation fails while it is trying to run SQL Server script files. The following error message demonstrates an example of this failure with the Upgrade.sql file. This problem might also occur with other SQL Server scripts during the upgrade process.

Error running script: upgrade.sql(1)

Followed by:

An error occurred when running the upgrade on your server.

The following errors are logged in the Sqlsp.log file located in the temp directory of the computer on which it was run: 11:59:32 Mode: Normal 11:59:34 Resuming Setup - starting at position 2 11:59:40 Begin CleanUpInstall 11:59:42 C:\TEMP\_ISTMP7.DIR\scm.exe -Silent 1 -Action 6 -Service MSSQLServer 12:00:22 Prcess Exit Code: (0) 12:00:32 C:\TEMP\_ISTMP7.DIR\scm.exe -Silent 1 -Action 1 -Service MSSQLServer -StartupOptions \-f \-m 12:00:53 Process Exit Code: (0) 12:01:03 C:\TEMP\_ISTMP7.DIR\osql.exe -n -d master -q&quot;exit&quot; -U sa -P 12:01:03 Process Exit Code: (1) 12:01:03 C:\TEMP\_ISTMP7.DIR\osql.exe -n -d master -i &quot;D:\MSSQL7\install\upgrade.sql&quot; -U sa -P 12:01:03 Process Exit Code: (1) 12:01:13 Error running script: upgrade.sql (1) 12:01:13 C:\TEMP\_ISTMP7.DIR\scm.exe -Silent 1 -Action 6 -Service MSSQLServer 12:01:33 Process Exit Code: (0) 12:01:33 C:\TEMP\_ISTMP7.DIR\scm.exe -Silent 1 -Action 6 -Service MSSQLServer 12:01:43 Process Exit Code: (0) 12:01:45 An error occurred when running the upgrade on your server. 12:01:45 Installation Failed. The Upgrade.out file found in the \Mssql7\Install directory also contains the following error message:

Login failed for user 'username'



CAUSE
Just before the setup attempts to run the SQL Server script files, it puts SQL Server in single user mode. If there are any applications or processes that automatically connect to SQL Server after it starts, they use up the single available connection before the setup process can connect to SQL Server. This prevents the SQL Server script file from running and causes the error message to occur.



WORKAROUND
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To work around this problem, follow these steps:  Delete the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Setup\&quot;Resume&quot;

 Rename the Sqlsp.log file located in the temp directory of the computer on which the service pack setup was run. In Control Panel, double-click Services. Stop all services and set them to manual, except the following: On Windows NT 4.0:

 Alerter ClipBook Server</li> Computer Browser</li> Directory Replicator</li> Event Log</li> License Logging</li> Messenger</li> Net Logon</li> Network DDE</li> Network DDE DSDM</li> NT LM Security Support Provider</li> Remote Procedure Call (RPC) Locator</li> Remote Procedure Call (RPC) Service</li> Schedule</li> Server</li> Spooler</li> UPS</li> <li>Workstation</li></ul>

On Windows 2000:

<ul> <li>Alerter</li> <li>Computer Browser</li> <li>Distributed File System</li> <li>Distributed Link Tracking Client</li> <li>Distributed Link Tracking Server</li> <li>DNS Client</li> <li>Event Log</li> <li>IPSEC Policy Agent</li> <li>License Logging Service</li> <li>Logical Disk Manager</li> <li>Messenger</li> <li>Net Logon</li> <li>NT LM Security Support Provider</li> <li>Network Connectors</li> <li>Plug and Play</li> <li>Process Control</li> <li>Remote Procedure Call (RPC) Locator</li> <li>Remote Procedure Call (RPC) Service</li> <li>Remote Registry Service</li> <li>Removable Storage</li> <li>RunAs Service</li> <li>Security Accounts Manager</li> <li>Server</li> <li>Spooler</li> <li>TCP/IP NetBIOS Helper</li> <li>Time Service</li> <li>Windows Management Instrumentation Driver Extensions</li> <li>Windows Time</li> <li>Workstation</li></ul>

</li> <li>Close all applications that might be open, including Microsoft Internet Information Server (IIS), BackupExec, NEtIQ, Microsoft Systems Management Server (SMS), and any anti-virus software.</li> <li>Restart the computer, and then log on with an account that has Local Administrator privileges for that computer. Run the service pack installation. If the setup still fails, repeat the preceding steps and continue with step 6.</li> <li>Disconnect the computer from the network.

If you are unable to disconnect the computer from the network, try to identify which application or user is logging on to SQL Server when it starts by using these steps: <ol> <li>To enable auditing in the SQL Enterprise Manager, from the Tools menu, click SQL Server Configuration Properties, and then click Security.</li> <li>Under Audit Level, select All to audit both successful and failed login attempts.</li></ol>

This inserts an entry in the SQL Server error log and Microsoft Windows NT Application Log for each login attempt with the userid of the user.

NOTE: You should turn Auditing off when it is no longer required because it can cause the SQL Server error log and Windows NT Application Log to fill up.

</li> <li>Run the SQL Server Service Pack setup again.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
Another situation in which this error occurs is when the BUILTIN\Administrators login is missing in SQL Server or is not part of the sysadmin role. This happens because, during installation, the setup program launches Upgrade.sql using an ISQL-trusted connection, and the BUILTIN\Administrators group is used to grant to the members of the Windows NT 4.0 or Windows 2000 local administrators group.

Additional query words: sp sp2 sp3 sp4

Keywords: kbprb KB264123

-

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

© Microsoft Corporation. All rights reserved.