Due to the need of the course database System and Principles, I installed SQL Server 2019 and the corresponding DBMS on my computer last semester. Considering that the computer hard disk is small and SQL Server may be used less in the future, I want to drive it away from my computer completely today. I don’t know whether it can be realized. After all, database is a low-level system software.

Step 1: Close the database

Start by opening the Configuration Manager and closing the running SQL Server database.

Step 2: Uninstall the DATABASE management system

Then considering that DBMS is application software, and database is system software, here I think it is better to uninstall from the top down. So uninstall the database management system first.

Click uninstall.

Okay, so this shows that it’s uninstalled. Then find the installation directory and delete it.

Step 3: Shut down the service

Open the service, and then close the running SQL Server service.

Step 4: Uninstall the SQL Server

Then open the uninstall function in the control panel.

In this case, let’s delete.

This shows processing, please wait a moment ~

Then select the instance, we only have one instance here, do not make changes, go to the next step!

Here select function, is to select all, if you want to delete clean, be sure to select all!

To make sure, the operation is Unistall and unloads the database engine service, SQL Browser and SQL writer.

Note the configuration file path below

C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log\20210721_140438\ConfigurationFile.ini

Then click Delete.

It’s gonna be a long wait. Well, Microsoft stuff, you know.

The deletion is now complete and the log address is saved

Then go to the address, you can find the remaining folder, delete it. Then locate the Azure Data Studio you installed when you installed your database management system.

Remove it and all its components completely.

Then locate the installation file where the database was installed and delete it.

And then unload them!

Step 5: Delete the registry

Enter run, then type regedit.

Then go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

Delete PendingFileRenameOperations key values.

Then enter theHKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL ServerDelete the registry

Then go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

Delete the registry

In this way, SQL Server is basically deleted clean.