How to manually delete SQLServer2000 default instances, named instances, or virtual instances

Source: Internet
Author: User
Tags mssqlserver
Before deleting Microsoft SQL Server, consider the following steps: delete SQL server: delete a specific instance of SQL Server delete all known instances of SQL Server delete default instances of SQL Server Delete name instances of SQL Server how to include full-text retrieval Delete reinstall SQL Server delete Temporary Folder

Before deleting Microsoft SQL Server 2000, consider the following steps to delete SQL Server: delete a specific instance of SQL Server delete all known instances of SQL Server delete default instances of SQL Server Delete named instances of SQL Server how to include full-text search delete a Temporary Folder before re-installing SQL Server

Considerations before deleting Microsoft SQL Server 2000
To delete an SQL Server instance
Delete a specific instance of SQL Server
Delete all known instances of SQL Server
Delete the default instance of SQL Server
Delete A named SQL Server instance
How to include full-text search and delete
Delete contents in the Temporary Folder before re-installing SQL Server
Reference
The information in this article applies:

Summary
This section describes how to prepare for the system to reinstall the SQL Server program.

The correct method to delete Microsoft SQL Server 2000 (recommended by Microsoft) is to use the uninstall option in the Microsoft SQL Server 2000 installation program. However, if the installation fails, you may not be able to use the uninstall option. If you cannot use the uninstall option, you must restore the system to a clean and stable installation point before trying to reinstall the SQL Server program.

Note: Microsoft SQL Server 2000 (64-bit) Installer uses the Windows installer to fully integrate the installation of SQL Server functionality into a function tree. The minimum and typical installation modes are no longer used. By default, the installer displays the function tree and selects all available features. The administrator can customize the installation by selecting a project in the function tree and changing the installation path. For more information, see the SQL Server 2000 (64-bit) documentation.

Considerations before deleting Microsoft SQL Server 2000
Important: you may want to save some databases in the current status. You may also want to save the changes made to the default database. If any of the above conditions is met, ensure that known data backup is retained before proceeding with the steps described in this article, or copy all data and log files to a folder other than the MSSQL folder, because you must delete the MSSQL folder in the following operations.

The files that must be saved include the following database files installed by Microsoft SQL Server 2000: • Distmdl .*
• Master .*
• Mastlog .*
• Model .*
• Modellog .*
• Msdbdata .*
• Msdblog .*
• Northwnd. * (optional)
• Pubs .*
• Pubs_log .*
• Tempdb .*
• Templog .*

Warning If the installed SQL Server is also used with Microsoft SQL Server Reporting Services, make sure that the following folders and subfolders are saved or renamed: • Default path/Reporting Services
• Default path/MSSQL/Reporting Services
• Default path/SQL Server Instance name/Reporting Services
• Default path/80/Tools/Report Designer
Note: The Default path indicates % ProgramFiles %/Microsoft SQL Server

Microsoft also recommends that: • for Microsoft SQL Server 2000 configured as a cluster system, ensure that no other cluster resources are dependent on Microsoft SQL Server 2000 to be deleted.

For other information, click the following article number to view the article in the Microsoft Knowledge Base:
835185 (http://support.microsoft.com/kb/835185/) failover cluster resource dependency in SQL Server
• Stop Microsoft SQL Server 2000 because an active connection may cause the uninstallation process to fail.
• Close all Microsoft SQL Server 2000 clients or administrative tools on other nodes.
• Log on to the Server using a Microsoft SQL Server 2000 Service account or an account with equivalent permissions (that is, a member account in the Local Administrator group. If you configure SQL Server as a cluster system, the account you use must be a member of the Local Administrators Group on all cluster nodes.

To delete an SQL Server instance
Important: This article contains information about registry modification. Before modifying the registry, you must back up the registry and know how to restore the Registry in case of a problem. 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 (http://support.microsoft.com/kb/256986/) Microsoft Windows registry description

Warning improper use of Registry Editor may cause serious problems and you may need to reinstall the operating system. Microsoft cannot guarantee that you can solve problems caused by improper use of the Registry Editor. You are at your own risk to use the Registry Editor.
Depending on your specific environment, you can take one or more of the following steps.

After the SQL Server is successfully deleted, you do not need to continue with the remaining steps in this list.

1. For a virtual Server, use the Microsoft SQL Server 2000 installer on the installation disc, and then click the "Uninstall" option. The "How to uninstall an existing installation of SQL Server (Setup)" (How to uninstall an existing SQL Server installation (installer) topic in the SQL Server online manual describes this.
2. For non-cluster (independent) instances, you can perform Step 1 or open the Add/delete Applet in the control panel.
3. In the control panel, open the Add/delete applet.
4. Run Regedt32 and find the following registry key:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall
Under the Uninstall option, find the product code of the Microsoft SQL Server 2000 instance to be deleted.

On the taskbar, click Start, and then click Run. In the run dialog box, copy and paste the following command, or enter the following command:

C:/WINNT/IsUninst.exe-f "C:/Program Files/Microsoft SQL Server/MSSQL $ Server1/Uninst. is "-c" C:/Program Files/Microsoft SQL Server/MSSQL $ Server1/sqlsun. dll "-Mssql. miff I = I1

If the preceding steps are invalid, You can manually delete Microsoft SQL Server 2000 by following the steps in the delete all known instances of SQL Server section.

Note: you do not need to delete SQL Server 2000 completely. Perform these steps to restore the system to the status where it can be successfully installed, so that you can delete the restored Microsoft SQL Server 2000 installation after the installation is complete.


5. Find the installed Data folder. If you want to save the Data, rename the folder. Otherwise, delete the Data folder. Microsoft recommends that you keep the Data folder, which is equivalent to retaining the backup of the MDF and LDF format database flat files. If you rename the Data folder, you only need to use the same name, path, and IP address when re-installing SQL Server, you can restore the existing Data to the same status and conditions as when taking SQL Server offline.


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

Delete a specific instance of SQL Server
To delete a specific instance of SQL Server, follow these steps: 1. find and delete the % drive %:/Program Files/Microsoft SQL Server/MSSQL/Binn folder, where % drive % is the location of the SQL Server instance to be deleted.
2. Find the following registry key: • HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSSQLServer

Note: To delete a default instance, you must delete all items except the Client items.
• HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft SQL Server

You must use Regedt32.exe to edit the InstalledInstances value of the instance to be deleted. The display name of the default instance is MSSQLSERVER, and the display name of the named instance is the name specified for the instance.

Note: you cannot use Regedit.exe to edit this value. You must use Regedt32.exe.


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

Delete all known instances of SQL Server
To delete all known instances of SQL Server, follow these steps: 1. Find and delete the % drive %:/Program Files/Microsoft SQL Server/MSSQL/Binn folder.
2. Find and delete the following registry key: • HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSSQLServer
• HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft SQL Server



3. Find and delete the following registry key: • HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSQLServer
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SQLSERVERAGENT
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSQLServerADHelper

4. The three registry entries in step 3 correspond to the default instances of Microsoft SQL Server 2000. The registry key corresponding to the named instance is similar to the registry key listed in step 3, but it is followed by $ instance_name, because instance_name is the name specified for a specific instance. Find the registry key corresponding to the instance to be deleted, and select and delete them. • HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSQLServer $ InstanceName
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SQLSERVERAGENT $ InstanceName
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSQLServerADHelper


5. If the SQL Server instance to be deleted is configured as a cluster system, delete all cluster resources of the instance in the Cluster Manager.

Note: Only SQL Server resources are deleted.
6. reinstall Microsoft SQL Server 2000 and use the same name and IP address.
7. Run the installer and use the uninstall option to eliminate any configuration problems or errors that may result from installation failure.


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

Delete the default instance of SQL Server
To delete the default instance of SQL Server, find and delete the following registry key: • HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Search
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSQLServer
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SQLSERVERAGENT

Delete A named SQL Server instance
To delete a named SQL Server instance, follow these steps: 1. Find and delete the following registry key for a named instance, where InstanceName is the name of the instance to be deleted. • HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSQLServer $ InstanceName
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/SQLSERVERAGENT $ InstanceName

2. If the SQL Server instance to be deleted is configured as a cluster system, delete all cluster resources of the SQL Server instance in the Cluster Manager.

Note: Only SQL Server resources are deleted.
3. reinstall Microsoft SQL Server 2000 and use the same name and IP address.
4. Run the installer and use the uninstall option to eliminate any configuration problems or errors that may result from installation failure.


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

How to include full-text search and delete
To include full-text search and deletion, follow these steps: 1. Delete the following registry key. Steps in this section: • HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSCNTRS
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSEARCH
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSGATHERER
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSGTHRSVC
• HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/MSSINDEX
Note: If you delete these registry items, Microsoft Search is disabled ). If the following applications run on the same computer, this operation may affect them: • Microsoft Exchange Server
• Microsoft SharePoint Portal Server
• Microsoft Site Server
• Microsoft Commerce Server
• Microsoft Small Business Server

2. If the SQL Server instance to be deleted is configured as a cluster system, delete all cluster resources of the SQL Server instance in the Cluster Manager.

Note: Only SQL Server resources are deleted.
3. reinstall Microsoft SQL Server 2000 and use the same name and IP address.
If MSSearch is not deleted, the following error message may occur when SQL Server 2000 is re-installed:

[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 cocould not be found.

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


If the error message appears, restart the server, delete MSSearch, and try to install it again.

Note: Because the deletion process has not been completed before, if you are worried about whether to delete the instance in the future, you can perform the following steps to verify whether all problems that may cause this problem to occur again. If you only want to confirm that the specific deletion has been completed, you do not need to perform this step because this step only checks whether the automatic deletion process is valid. Run the SQL Server installer and use the "Uninstall" option to immediately verify the deletion process, instead of waiting until this function is available. If this step fails, you must continue to check, identify the cause of the failure, and solve the problem.

Run the installer and use the uninstall option to confirm that there are no configuration problems or errors left over due to deletion failure.

Note: In some cases, the folder % drive %: "/Program Files/Microsoft SQL Server/80 may not be deleted. You must delete it manually.

When installing SQL Server 2000, the following error message may appear:

A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup
If this error message is displayed, restart the server and try to install it again. If the error message is displayed again after the server is restarted, the file to be deleted may be read-only.

Follow these steps to check whether these files are read-only: 1. Find the following registry key:
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/PendingFileRenameOperations
2. Write down the file name.
3. Make sure that the read-only attribute is not set for these files.
4. Restart the server again.

Delete contents in the Temporary Folder before re-installing SQL Server
Delete all contents in the Temporary Folder. The temporary folder includes both the System Temp folder and the Temp folder of the installer. To determine the location of your Temporary Folder, enter the following command at the command prompt:
C:/Documents and Settings/username> set t
The result should contain the following:
TEMP = C:/DOCUME ~ 1/username/LOCALS ~ 1/Temp
TMP = C:/DOCUME ~ 1/username/LOCALS ~ 1/Temp
Other items may be listed. The typical path is as follows:
C:/Documents and Settings/username/Local Settings/Temp
The typical path of System Temp is % systemroot %/temp.

Reference
If the file is still being processed, see the following article in the Microsoft Knowledge Base:
312995 (http://support.microsoft.com/kb/312995/) SQL Server 2000 installation failed and "... previous program installation..." error message is given

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.