Thoroughly clear SQL Server databases

Source: Internet
Author: User
Tags mssqlserver

During the installation of the application system for the partner schools, the same problem occurs after the SQL Server 2000 database in the school is damaged and reinstalled. That is, the installation of the SQL Server database fails. Cause: Even if you normally unmount the SQL Server database through the "Add/delete programs" on the control panel, the SQL Server is still not completely uninstalled and manual operations are required. Therefore, the re-installation fails, and many people have to reinstall the system to solve the problem. After a long time of exploration and practical summarization, I found some tips and methods to share with you here.
Procedure:

Before performing this operation, we recommend that you back up the registry and important database files.

First, we will try to uninstall the isuninst.exe program to safely uninstall the program and its related components in Windows:

(1)run regedit.exe and find the following registry key:

 

HKEY_LOCAL_MACHINE/software/Microsoft/Windows/CurrentVersion/uninstall

(2) Under the uninstall option, find the product code of the Microsoft SQL Server2000 instance to be deleted.

(3) On the taskbar, click Start and then click Run. In the run dialog box, copy and paste the following command, for example:

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 = Il

MSSQL serverl indicates that the installed instance is named serverl.

If the above method does not work, we must manually delete it.

(1) Delete the following registry subkeys:

HKEY_LOCAL_MACHINE/software/Microsoft/MSSQLServer

HKEY_LOCAL_MACHINE/software/Microsoft SQL Server

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/MSSQLServer

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/sqlserver agent

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/MSSQLServerADHelper

(2) manually delete the installation directory, which is located by default:

 

C:/program files/Microsoft SQL Server

(3) To uninstall the Microsoft Search Service, you also need to delete it:

HKEY_LOCAL_MACHINE/software/Microsoft/search

 

(4) uninstall Microsoft full-text query and delete it:

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/msftpsvc

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/msscntrs

 

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/MSSEARCH

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/mssgatherver

 
HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/mssgthrsvc

 

HKEY_LOCAL_MACHINE/system/CurrentControlSet/services/mssindex

(5) If You Want To uninstall a named instance, add "/" and the corresponding instance name after MSSQLServer, SQLServerAgent, and MSSQLServerADHelper of the corresponding registry key.

 

At this point, we have successfully uninstalled the SQL Server database.

Related Article

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.