This is an old revision of the document!


SQL Server - How to Get a List of Instances on the Local System

You can find out the list of locally installed SQL Server instances in the Windows registry (regedit.exe) at the following location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL

Additionally, you can get this list by running the following command line (cmd.exe):

  C:\>reg.exe query "HKLM\Software\Microsoft\Microsoft SQL Server\Instance Names\SQL"

For example, for SQL Server 2008 R2 Express default installation, the command returns:

reg.exe query
SQLEXPRESS REG_SZ MSSQL10_50.SQLEXPRESS

Last Update: Microsoft SQL Server 2008 R2

Resources