One of my blog readers contacted me and informed that he is getting the same error as mentioned in below blog SQL SERVER – Service Pack Failure: MissingRegistryKeyException. Note that it had the same error message, but that did not help him here. In this blog, we would learn how to fix MissingRegistryKeyException while installing SQL Server service pack. Let us fix the error registry key is missing.
Below is the trimmed version of log (Detail.txt)
Microsoft.SqlServer.Configuration.SqlEngine.MissingRegistryKeyException: The registry key System\CurrentControlSet\Services\MSSQLSERVER\Performance is missing.
Since he already tried following my earlier blog, I was wondering what to do next. A thought of running a REPAIR of SQL Server instance came to my mind. I quickly checked what all actions do a REPAIR take care.
One of the points mentioned in the above article was, And, this brought a smile on my face.
Here is the repair option from LandingPage in setup. Below image is taken from SQL Server 2017 setup media bit option remains same (SQL 2008 onwards)
I suggested him to go ahead and use SQL Server REPAIR using the RTM Media and asked to re-run the patch. He sent me an email that he again tried to run the service pack after repair and it was completed without any errors.
Have you used Repair option in SQL Server setup? When did you use, and did it help? Please let me know via comments.
Reference: Pinal Dave (https://blog.sqlauthority.com)