Cannot find SQL instance when applying patch

This post has been republished via RSS; it originally appeared at: SQL Server Support articles.

One customer had a SQL2016 SP1 instance. We can login this instance without any issue. But when we tried to apply SQL2016 SP2 in this server. We cannot find SQL instance in below panel. Only ‘Shared Features’ are listed.



I decompiled SQL setup dlls. It seems that SQL setup should check below registry key to Enumerate SQL Server features.




We found below key was missing in customer’s environment. We tried to remove below key in my testing environment. We can reproduce the same issue.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft SQL Server 13

However, after adding back above key. SQL instance is still not found in patching in customer’s environment. So we still need to check the keys in ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Unistall’.


We found 2 product codes are related with SQL Server 2016 database Engine service.





But according to the name of msi package,  {51574D2C-DE28-4441-BDC2-967F0FFC0918} is the real database engine service product code.

We can also run PowerShell scripts to verify.





We found below registry keys have {0C457EC3-E998-4041-B856-908D5A2C1708} in "ProductCode". But it’s incorrect.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER\Setup\SQL_Engine_Core_Inst]


We finally resolved this issue by making below changes. Those 2 wrong product codes caused this issue.


    "ProductCode"="{0C457EC3-E998-4041-B856-908D5A2C1708}"  change to {51574D2C-DE28-4441-BDC2-967F0FFC0918}


  1. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL13.MSSQLSERVER\Setup\SQL_Engine_Core_Inst]
    "ProductCode"="{0C457EC3-E998-4041-B856-908D5A2C1708}" change to {51574D2C-DE28-4441-BDC2-967F0FFC0918}

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

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