Groups | Blog | Home
all groups > sql server (alternate) > november 2003 >

sql server (alternate) : Server Name in Registry



grawsha2000 NO[at]SPAM yahoo.com
11/28/2003 9:26:11 AM
Greetings,

Under which Registry key can I find SQL Server Name?

MTIA,
Simon Hayes
11/29/2003 1:30:33 PM

[quoted text, click to view]

You need to clarify what you mean by the server name. Do you mean the
hostname of the server, or the name of a specific MSSQL instance on the
server? If the first, then it would be better to use an interface like WMI
to get the name. If the second, then you can look at this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\InstalledInstances

From TSQL, you can use serverproperty() to get this information.

Simon

AddThis Social Bookmark Button