Why do I have so many things related to MICROSOFT SQL SERVER in my registry

Rashedul Hasan 1 Reputation point

The problem started with me trying to install microsoft sql server 2019 express. It didn't install and showed error. So, i tried to clean up the installation files following this link.

But while cleaning the registry I found a lot of entries related to the microsoft sql server. Why are this here and should I remove them from registry? What else do i need to do?

  • in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft : 211358-4-sqlserver-old-instances-in-regestry.png
  • in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft : 211412-5-sqlserver-old-instances-in-regestry-2.png

Also, I can't delete the folder "Microsoft SQL Server" in "C:\Program Files\". shows error: 211375-3.png

I have also tried to follow some other websites for solution and according to one of them - they advised to use ccleaner software. and weirdly in the ccleaner tools tab - there are also a list of sql server programs : 211376-6-ccleaner-tools-multiple-sql-server.png

So, what do I do? what should I delete and what should I keep?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
8,509 questions
No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Michael Taylor 37,946 Reputation points

    You will irrepairably corrupt your system if you try deleting files/registry entries related to SQL Server, even using tools. SQL Server, the product, uses entries/files in these areas but so does a lot of other stuff. Whether you have SQL Server installed or not you probably have the native driver and other components needed to talk to SQL. They are installed here. On top of that you might have tools like Visual Studio installed that ships with stuff related to SQL Server and they'll create/add to entries here as well. If you just start deleting things because they say SQL Server you will corrupt unrelated apps and potentially get into a situation where the only real recovery is a clean install.

    Uninstall SQL Server using its installer. Whatever is left is most likely needed by other things. There are a couple of exceptions. For example in the file system you might still have a DATA directory where you installed SQL. You can remove that but things like 'Common Files' and other versions you should not remove. You can, and probably do, have multiple versions of SQL installed on your machine. They all share a root directory structure. For example if you installed Visual Studio then it installed a local SQL copy that stores some of its files here.

    For the most part having extra registry entries/files laying around shouldn't hurt anything. Of course if you have SQL services starting up that is a different problem but just having a SQL Server registry entry/directory is harmless.

    No comments

  2. Erland Sommarskog 67,721 Reputation points Microsoft MVP

    I agree with cooldadtx, don't mess with the registry or start to delete files at random. What originally might have been an error you could be salvaged from, you may end up in a situation where you cannot move neither forwards or backwards.

    What was the error you got when you tried to install SQL Server? In C:\program files\Microsoft SQL Server\150\Setup Bootstrap\Log, there should be one folder per installation attempt. Upload Summary.txt and details.txt and we can take a look.

    No comments

  3. CathyJi-MSFT 20,661 Reputation points Microsoft Employee

    Hi @Rashedul Hasan ,

    Full agree with cooldadtx and Erland, please do not delete registry and files at random. If you want to resolve the SQL server 2019 installation issue, please start from SQL server setup log as Erland mention.

    In addition, you can use below cmd command to get the SQL server instance named that installed on your server. Please run cmd as administrator.

    reg query "HKLM\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL  


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    No comments

  4. Rashedul Hasan 1 Reputation point

    Thank you @Michael Taylor , @Erland Sommarskog and @CathyJi-MSFT .

    I actually ended up resetting my windows.