Microsoft KB Archive/290991

= How to manually remove SQL Server 2000 default, named, or virtual instance =

Article ID: 290991

Article Last Modified on 6/11/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q290991



IN THIS TASK
SUMMARY
 * Things to consider before you remove Microsoft SQL Server 2000
 * Steps to remove SQL Server
 * Remove a specific instance of SQL Server
 * Remove all known instances of SQL Server
 * Remove a default instance of SQL Server
 * Remove a named instance of SQL Server
 * How to include full-text removal
 * Delete contents of Temp folders before you reinstall SQL Server
 * REFERENCES



SUMMARY
The steps in this article describe how you prepare your system for a reinstallation of the SQL Server program.

The correct way (and the way that Microsoft recommends you use) to remove Microsoft SQL Server 2000 is to use the Uninstall option that is available in the Microsoft SQL Server 2000 Setup program. However, if an installation fails, the Uninstall option may not be available. If the Uninstall option is not available, you must get the system to a clean, stable installation point before you try to reinstall the SQL Server program.

Note The Microsoft SQL Server 2000 (64-bit) setup program uses the Windows Installer to completely integrate the installation of SQL Server features in a single feature tree. The minimum and the typical installation modes are no longer implemented. By default, the Setup program displays the feature tree with all the available features selected. Administrators can customize an installation by selecting items on the feature tree and by changing installation paths. For more information, see the SQL Server 2000 (64-bit) documentation.

back to the top

Things to consider before you remove Microsoft SQL Server 2000
IMPORTANT WARNING: You may have databases that you want to save in their present state. You may also want to save changes that were made to the default databases. If either is true, before you follow the steps in this article, make sure that you have a known good backup of the data or that you save a copy of all the data and log files in a folder other than the MSSQL folder, because you must delete the MSSQL folder.

The files you must save include these database files that Microsoft SQL Server 2000 installs:
 * Distmdl.*
 * Master.*
 * Mastlog.*
 * Model.*
 * Modellog.*
 * Msdbdata.*
 * Msdblog.*
 * Northwnd.* (optional install)
 * Pubs.*
 * Pubs_log.*
 * Tempdb.*
 * Templog.*

Warning If the SQL Server installation is also being used in conjunction with Microsoft SQL Server Reporting Services, make sure that the following folders and the sub-folders are also saved or renamed:
 * \Reporting Services
 * \MSSQL\Reporting Services
 * \ \Reporting Services
 * \80\Tools\Report Designer

Note  refers to %ProgramFiles%\Microsoft SQL Server

Microsoft also recommends that:  You verify that no other cluster resources have dependencies on Microsoft SQL Server 2000, if Microsoft SQL Server 2000 is clustered.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

835185 Failover cluster resource dependencies in SQL Server

 You stop Microsoft SQL Server 2000, because active connections can prevent the uninstall process from completing successfully. You close all Microsoft SQL Server 2000 Client or Administration tools on other nodes. You log onto the server with the Microsoft SQL Server 2000 service account or an account of equivalent privileges (that is, an account that is a member of the Local Administrator group). If SQL Server is clustered, the account you use must be a member of the Local Administrators group on all the cluster nodes.

back to the top

Steps to remove SQL Server
Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

Depending on your specific environment, you can use one, or more, of the steps that follow.

After you successfully remove SQL Server, you do not have to continue with the remaining steps in this list.

 Locate the Data folder for your installation, and then rename it if you have to save the data. Otherwise, delete the Data folder. Microsoft recommends that you keep the Data folder so that you have a flat file backup of the databases in an MDF and LDF format available. If you rename the Data folder, you can recover the existing data in the same state and condition it was in when you took the instance of SQL Server offline, provided the re-installation uses the same name, path, and IP address. For a virtual server, use the Microsoft SQL Server 2000 Setup program that is on the CD and click the Uninstall option. This is documented in the &quot;How to uninstall an existing installation of SQL Server (Setup)&quot; topic in SQL Server Books Online.</li> For a non-clustered (stand-alone) instance, you can either follow step 1, or, in Control Panel open the Add/Remove Programs applet.</li> In Control Panel, open the Add/Remove Programs applet.</li> Run Regedt32, and then locate this registry key:

Under the Uninstall key, locate the product code for the instance of Microsoft SQL Server 2000 that you are trying to remove.

On the Taskbar, click Start, and then click Run. In the Run dialog box, copy and paste, or type, this command:

C:\WINNT\IsUninst.exe -f&quot;C:\Program Files\Microsoft SQL Server\MSSQL$Server1\Uninst.is&quot; -c&quot;C:\Program Files\Microsoft SQL Server\MSSQL$Server1\sqlsun.dll&quot; -Mssql.miff i=I1

If these steps do not work, you can follow the steps in the Remove All Known Instances of SQL Server section to remove Microsoft SQL Server 2000 manually.

Note It is not the intent to remove 100 percent of SQL Server 2000 at this time. These steps are intended to get the system to a state where you can perform a successful installation, so that you can then remove the Microsoft SQL Server 2000 installation that is being recovered.</li></ol>

Note If this is a clustered instance of SQL Server 2000, repeat these steps for each node in the cluster.

back to the top

Remove a specific instance of SQL Server
To remove a specific instance of SQL Server, follow these steps:
 * 1) Locate, and then delete the %drive%:\Program Files\Microsoft SQL Server\MSSQL\Binn folder where %drive% is the location of the instance of SQL Server you want to remove.
 * 2) Locate, the following registry key:

Note If you are deleting a default instance, you must delete all the keys EXCEPT the Client key.

You must use Regedt32.exe to edit the InstalledInstances value of the instance you are removing. A default instance is listed as MSSQLSERVER, and named instances appear as the name given to the instance.

Note You cannot use Regedit.exe to edit the value; you must use Regedt32.exe instead.

Note If this is a clustered instance of SQL Server 2000, repeat these steps for each node in the cluster.

back to the top

Remove all known instances of SQL Server
To remove all known instances of SQL Server, follow these steps: <ol> Locate, and then delete the %drive%:\Program Files\Microsoft SQL Server\MSSQL\Binn folder.</li> Locate, and then delete these registry keys:   </li>  </li></ul>

</li> Locate, and then delete these registry keys:   </li>  </li>  </li></ul> </li> The three registry keys in step 3 correspond to the default instance of Microsoft SQL Server 2000. Named instances appear similar to those listed in step 3, along with $instance_name, because instance_name is the name given to your particular instance. After you locate the correct keys for the instance you are removing, select those keys, and then delete them.  <li> $InstanceName</li> <li> $InstanceName</li> <li> </li></ul>

</li> <li>If the instance of SQL Server you are removing was clustered, remove any cluster resources for the instance that may remain in the Cluster Administrator.

Note Only remove SQL Server resources.</li> <li>Reinstall Microsoft SQL Server 2000 and use the same name, and IP address.</li> <li>Run the Setup for the installation, and use the Uninstall option to clean up any configuration problems or errors that may still exist because of the failed installation.</li></ol>

Note If this is a clustered instance of SQL Server 2000, repeat these steps for each node in the cluster. back to the top

Remove a default instance of SQL Server
To remove a default instance of SQL Server locate, and then delete these registry keys:

back to the top

Remove a named instance of SQL Server
To remove a named instance of SQL Server, follow these steps:
 * 1) Locate, and then delete these registry keys for a Named Instance, where InstanceName is the name of the instance that you are removing.
 * 2) * $InstanceName
 * 3) * $InstanceName
 * 4) If the instance of SQL Server you are removing was clustered, remove any cluster resources for this instance of SQL Server that may remain in the Cluster Administrator.

Note Only remove SQL Server resources.
 * 1) Reinstall Microsoft SQL Server 2000 and use the same name, and IP address.
 * 2) Run the Setup for the installation, and then use the Uninstall option to clean up any configuration problems or errors that may still exist because of the failed installation.

Note If this is a clustered instance of SQL Server 2000, repeat these steps for each node in the cluster. back to the top

How to include full-text removal
To include full-text removal, follow these steps: <ol> <li>Delete the following registry entries. Only use this section when you use the steps in the Remove All Known Instances of SQL Server section: <ul> <li> </li> <li> </li> <li> </li> <li> </li> <li> </li></ul>

Note Deleting these registry keys disables the Microsoft Search service (MSSearch). This can affect the following applications if they are running on the same computer: <ul> <li>Microsoft Exchange Server</li> <li>Microsoft SharePoint Portal Server</li> <li>Microsoft Site Server</li> <li>Microsoft Commerce Server</li> <li>Microsoft Small Business Server</li></ul> </li> <li>If the instance of SQL Server you are removing was clustered, remove any cluster resources for this instance of SQL Server that might remain in the Cluster Administrator.

Note: Only remove SQL Server resources.</li> <li>Reinstall Microsoft SQL Server 2000 and use the same name, and IP address.</li></ol>

If you do not remove MSSearch, you may receive the following error messages when you reinstall SQL Server 2000:

[sqlclusterSetup.cpp:464]: 2 (0x2): The system cannot find the file specified. Problem in the resource name SQL Server Fulltext.

[clushelp.cpp:1238]: 5007 (0x138f): The cluster resource could not be found.

[sqlclusterSetup.cpp:1059]: 5007 (0x138f): The cluster resource could not be found.

If you receive these error messages, restart your servers, follow the steps to remove MSSearch, and then try the installation again.

Note: Because the removal process did not complete previously, if you are concerned about being able to remove an instance in the future, you can perform the following step to verify that you have resolved all the issues that can cause a recurrence of this problem. You do not have to perform this step just to make sure that this particular removal completed; it only checks whether the automatic removal process is working. Run the SQL Server Setup program and use the Uninstall option to verify the removal process now instead of waiting until you must have this functionality. If this step fails, you must continue to investigate to determine and resolve the cause of the failure.

Run Setup for the installation, and then use the Uninstall option to verify that there are no configuration problems or errors that may still exist because of the failed removal.

Note: In some cases, the folder %drive%:&quot;\Program Files\Microsoft SQL Server\80 may not be deleted, and you must manually delete the folder.

When you reinstall SQL Server 2000, the following error message may occur:

A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup

If the error message occurs, restart your servers, and then try the installation again. If you receive the error message again, after you restart the server, the files you are trying to delete are probably Read-only.

Follow these steps to see if the files are Read-only: <ol> <li>Locate this registry key:

</li> <li>Note the file names.</li> <li>Verify that those files do not have the Read-only attribute set.</li> <li>Restart the server again.</li></ol>

back to the top

Delete contents of Temp folders before you reinstall SQL Server
Delete all contents from the Temp folder of both the System Temp and the Temp folder of the installing user. To determine the location of the Temp folder for the user, type the following command at a command prompt:

C:\Documents and Settings\username>set t

The results should include the following: TEMP=C:\DOCUME~1\username\LOCALS~1\Temp TMP=C:\DOCUME~1\username\LOCALS~1\Temp Other items may also be listed. The typical path is the following:

C:\Documents and Settings\username\Local Settings\Temp

The typical path for the System Temp path is %systemroot%\temp. back to the top

<div class="references_section">