search
top

Manually Uninstalling MSSQL Server 2008 R2

Every once in awhile you run into an issue where a program just doesn’t want to uninstall. Ran into this scenario with MSSQL Server 2008 R2. Following the normal Programs and Features uninstall in Control Panel I received the message of failed to uninstall.

This process requires removing directories, services and registry entries. As with anytime the registry is involved you will want to back up the registry.

Remove SQL Server Services

First remove any SQL services using sc delete <service> command. To get the name of the service double click on it in services.msc and find the name used for ServiceName or use sc command from the command prompt.

C:\> sc query | find /I “sql”

Now that we have the service name, let’s stop them and remove them from existence.

Open a command prompt and type

C:\> net stop <servicename>

C:\> sc delete <servicename>

Do this for all the services. Found for SQL server.

Delete Microsoft SQL Server Directories

Delete the following directories.

  • C:\Program Files (x86)\Microsoft SQL Server
  • C:\Program Files\Microsoft SQL Server
  • C:\Program Files (x86)\Common Files\microsoft shared\SQL Debugging
  • C:\Program Files\Common Files\Microsoft Shared\SQL Debugging

It is possible there could be files and use and you will need to reboot and then retry the deletion after the reboot.

Delete Registry Entries

**Note: Backup the registry before deleting any entries. You can render the server unusable with an incorrect deletion.

With that stated let’s move ahead. Open regedt32 and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. Expand the key and click on each entry and delete any key that has SQL server in it and or matches

At this point you should be able to reinstall MSSQL Server 2008 R2 on your server.

4 Responses to “Manually Uninstalling MSSQL Server 2008 R2”

  1. Unsatisfied says:

    I did all of the following you have stated, but still having the same problem.

  2. Satisfied says:

    worked for me.
    Thank you

  3. Awerealis says:

    This is truly awesome, great thanks! Your instructions helped me to remove an old SQL 2008 R2 install that was carried over from a Win7 to Win10 upgrade. Windows Update was blocked up with a SQL 2008 Service Pack (now gone) plus the uninstaller wasn’t working with “Architecture Mismatch” error. Brilliant 😀

  4. M says:

    Worked for me…thank you

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

top