How to uninstall Microsoft SQL Server on Windows?

PowerADM.com / Windows / Windows Server / How to uninstall Microsoft SQL Server on Windows?

In this article, we’ll look at several ways to uninstall Microsoft SQL Server from a Windows computer.

Uninstalling an MS SQL Instance Using the Installer

You can use the source install image to properly uninstall Microsoft SQL Server. Mount the SQL installation ISO image and run a command prompt as an administrator. To remove the default MSSQL instance, use the following command:

setup.exe /ACTION=UNINSTALL /FEATURES=SQL /INSTANCENAME=MSSQLSERVER
  • Specify the list of SQL features to be removed in the /FEATURES option;
  • /INSTANCENAME – specifies the name of the SQL Server instance to be removed.

Or, you can simply run the command:

setup.exe /ACTION=UNINSTALL

If multiple instances of MS SQL are installed on the computer, the Remove SQL Server graphical dialog box will appear, in which you need to select the name of the MSSQLSERVER instance you want to uninstall.

remove sql server 2019 instance

Next, you need to select the SQL components that you want to remove and click Next.

secet sql server features to remove

This method only removes features included with the SQL Server distribution. Additional components such as SQL Server Management Studio or Reporting Services must be uninstalled separately.

Uninstall SQL Server via Windows Control Panel

If you don’t have a SQL Server install image, you can remove SQL Server as a standard Windows application from the Control Panel. Go to Settings -> Apps & Features (or run ms-settings:appsfeatures) and find your version of Microsoft SQL Server in the list. Click the Uninstall button and then Remove.

uninstall microsoft sql server from windows control panel

Uninstalling SQL Server Using MSIEXEC?

You can use the built-in Windows Installer tool (msiexec) to remove programs. In order to remove any program installed through the Windows Installer, you need to run the following commands:

msiexec /x {guid}

To get the GUID of MS SQL Server applications on Windows, run the command:

wmic product get Name,IdentifyingNumber

wmic product get Name,IdentifyingNumber -0 list windows installer guids

Each SQL Server component has its own GUID. To remove a specific feature, find it in the list, copy its GUID, and run the command:

msiexec /x {2C33F4D4-E9A5-4DE1-ACFE-3A13464E6703}

Confirm the removal of the SQL Server product feature.

msiexe uninstall SQL Server by GUID

Similarly, you need to remove other components of SQL Server.

Leave a Reply

Your email address will not be published. Required fields are marked *