Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Instance Server name

Author  Topic 

Yak Posting Veteran

76 Posts

Posted - 2006-12-05 : 00:30:50
How to find programmatically name of instance server?

Yak Posting Veteran

78 Posts

Posted - 2006-12-05 : 00:45:50
Hi ,

try - select @@Servicename

BOL Ref :

Returns the name of the registry key under which SQL Server is running. @@SERVICENAME returns 'MSSQLSERVER' if the current instance is the default instance; this function returns the instance name if the current instance is a named instance.

Go to Top of Page

- Advertisement -