THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Linchi Shea

Checking out SQL Server via empirical data points

Where is HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer?

For a SQL Server 2000 default instance, the registry keys and values under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer are absolutely critical to its functioning. So if someone tells you that the whole registry subtree underneath there does not exist on his box, but yet the SQL Server 2000 default instance works just fine on that box, what would be your response?

One thing you may do is to execute the following T-SQL command to check if the keys are indeed missing:

EXEC master.dbo.xp_regread 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\CurrentVersion', 'CurrentVersion'

Now, you may just get the current version number returned from this statement. To further verify that the keys are there, you may launch Regedit.exe from your workstation and connect to the registry on the box. You then navigate to the MSSQLServer key, and not surprisingly, you see all the SQL Server related registry keys and values right where they are supposed to be.

Case closed, right? Well, the person still claims that he can't see the registry keys, and even send you a Regedit screenshot to prove it. So you follow the exact steps of the person to reproduce the behavior. And surprisingly, you don’t see the registry keys, even though you are a local administrator.

What's going on?

Well, this is the scenario of running a 32-bit SQL Server 2000 default instance on Windows Server x64 edition. If you use a 64-bit tool (such as a 64-bit regedit.exe on the 64-bit Windows), you won’t see the keys because they are not stored there. In fact, the 32-bit SQL Server registry keys and values are actually stored under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer.

However, Windows provides a transparent registry ‘redirection’ for 32-bit tools. So, if you happen to use a 32-bit tool—such as regedit.exe from your 32-bit workstation and xp_regread from a 32-bit SQL Server 2000 Instance—to view the registry, you would see the keys underneath HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer just where you expect them to be.

Published Thursday, November 13, 2008 12:16 AM by Linchi Shea
Filed under:



David R Buckingham said:

Thanks for the info.  That would have driven me nuts trying to figure it out.

November 13, 2008 10:42 AM




October 26, 2009 7:51 AM

R A said:

Thank you for posting this. I spent some time trying to figure this out in our environment before I came across this.

June 25, 2015 2:47 PM

Henrik Staun Poulsen said:

If you have installed a named instance, I think I can see it moves to:


where my instance is called "DSA". I see this on a SQL Server 2016 SP1 box.

February 16, 2017 3:27 AM
New Comments to this post are disabled

About Linchi Shea

Checking out SQL Server via empirical data points

This Blog


Privacy Statement