How can you find sql server port number from windows registry

SQL Server 2000

Default instance

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServerMSSQLServerSuperSocketNetLibTCP

Named instance

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server(InstanceName)MSSQLServerSuperSocketNetLibTCP

SQL Server 2005

There is no distinction between default and named instances. An instance is assigned a number based on the order it was installed. We first need to locate the registry key for the instance, which looks like

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL.#

'#' is the number assigned to the instance. The instance name is stored as the default value for this registry key. For a default instance, it is MSSQLSERVER.

Once the registry key for the instance is found, we know the TCP/IP registry key is

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL.#MSSQLServerSuperSocketNetLibTCPIPAll

SQL Server 2008

Default instance

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLServerSuperSocketNetLibTCPIPAll

Named instance

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL10.(InstanceName)MSSQLServerSuperSocketNetLibTCPIPAll

Tags
Comments
Write the first comment
Leave a trace
Name *
Email *
Website
Anti SPAM * Code (5 + 6) =
Leave me a comment *
 
All comments are subject to editorial review
Post being viewed right now
Item date: 04.02.2009
Views: 1251
Item date: 11.04.2009
Views: 1359
Item date: 02.12.2010
Views: 1114
Item date: 30.03.2009
Views: 616
Item date: 08.03.2009
Views: 551
Item date: 17.06.2009
Views: 1278
Item date: 04.02.2009
Views: 836
Item date: 14.05.2009
Views: 1637
Item date: 26.09.2009
Views: 2107
Item date: 17.06.2009
Views: 1097