Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Completely Uninstall SQL Server

Learn how to completely Uninstall SQL Server with clear steps, practical examples, and troubleshooting tips for safer, more reliable results.

Table of Contents

How to Completely Uninstall SQL Server is easier to understand when the core ideas are paired with practical examples. The sections below explain the topic clearly, highlight useful steps, and point out details that can prevent common errors.

This guide will show you how to uninstall SQL Server completely. Follow the steps Here, you also need to prepare the system to be able to reinstall SQL Server.

Note : To uninstall an instance of SQL Server, you must be an administrator who has the right to login as a service. To uninstall a failover cluster of SQL Server, you need to use the Remove Node function available in SQL Server Setup to remove individual nodes.

Before uninstalling SQL Server, note the following important things:

  • Before uninstalling SQL Server components from a computer with a minimum physical memory capacity, make sure that the page file size is sufficient. The page file size must be twice the amount of physical memory. Inadequate virtual memory can cause incomplete SQL Server uninstallation.
  • If there are multiple versions of SQL Server, SQL Server Browser will automatically uninstall when the last version of SQL Server 2017 is uninstalled. If you want to uninstall all components of SQL Server 2017, you must uninstall the manual SQL Server Browser component from Programs and Features in Control Panel .
  • When uninstalling SQL Server will delete the tempdb data file that was added during installation. The file has the name or part of the name tempdb_mssql _ *. Ndf will be deleted if they exist in the system database directory.

How to Completely Uninstall SQL Server example image 1

Before uninstalling SQL Server

Step 1: Backup data

Although this is not a required step, many people want to back up the database with their current state or want to save changes made in the system database. Therefore perform data backup before uninstalling SQL Server. Also, save a copy of all data and log files in a folder, not saved in the MSSQL folder because this folder will be deleted during the uninstallation.

The files you must save include the following database files:

  • Master.mdf
  • Mastlog.ldf
  • Model.mdf
  • Modellog.ldf
  • Msdbdata.mdf
  • Msdblog.ldf
  • Mssqlsystemresource.mdf
  • Mssqlsustemresource.ldf
  • Tempdb.mdf
  • Templog.ldf
  • ReportServer [$ Version name]. This is Reporting Services' default database.
  • ReportServer [$ Version name] TempDB. This is Reporting Services' default temporary database

Step 2: Delete security groups on the machine.

Before uninstalling SQL Server, delete local security groups for SQL Server components.

Step 3: Stop all SQL Server services

You should stop all SQL Server services before removing the SQL Server components. The connection is still active, which may prevent successful uninstall.

Step 4: Use an account with appropriate permissions.

Log in to the server using the SQL Server service account or use an account with equivalent permissions. As an example,, you can log on to the server by using the account that is a member of the Local Administrators group.

Remove a version of SQL Server

Method 1: Uninstall SQL Server in Control Panel

Step 1. To start the uninstall process, go to Control Panel , then select Programs and Features .

Step 2. Right-click SQL Server and select Uninstall , then click Remove . This will launch the SQL Server Installation Wizard. Setup Support Rules run to verify computer configuration. To continue, click Next .

Step 3. On the Select Instance page, use the drop-down box to specify a version of SQL Server to remove, or specify the option to only remove the sharing features of SQL Server and management tools. To continue, click Next .

Step 4. On the Select Features page, specify the features to remove specific versions of SQL Server. Running rules to verify that the operation can complete successfully.

Step 5. On the Ready to Remove page, review the list of components and features that will be uninstalled, then click Remove to start uninstalling.

Step 6. Immediately after uninstalling the final version of SQL Server, other programs associated with SQL Server will still show up in the programs list in Programs and Features . However, if you close Programs and Features and open it the next time, it will refresh the list of programs, showing only the programs that are still installed.

Method 2: Uninstall SQL Server in regedit

If the above method fails, you can manually uninstall SQL Server according to the steps below:

Step 1 : Back up the registry.

Step 2: Delete the following keys in regedit:

HKEY_LOCAL_MACHINESOFTWAREMicrosoft Microsoft SQL Server

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServer

Step 3: Go to the following key: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall and delete all sub keys related to SQL Server.

Step 4: Go to the following key: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices and delete all key related to SQL Server

Step 5: Delete all SQL Server folders in the computer at C: Program Files Microsoft SQL Server and other subdirectories.

FAQ

What should you know about remove a version of SQL Server Method 1: Uninstall SQL Server in Control Panel?

Step 1. To start the uninstall process, go to Control Panel, then select Programs and Features.

What should you know about method 2: Uninstall SQL Server in regedit?

If the above method fails, you can manually uninstall SQL Server according to the steps below:

What is How to Completely Uninstall SQL Server?

This guide will show you how to uninstall SQL Server completely.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.