In this article

@@SERVICENAME (Transact-SQL)

12/03/2008

2 minutes to read

In this article

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.