@@SERVICENAME (T-SQL)

Returns the name of the registry key under which Microsoft® SQL Server™ is running.

Syntax

@@SERVICENAME

Return Types

nvarchar

Remarks

SQL Server runs as a service named MSSQLServer on Microsoft Windows NT®. It does not run as a service on Windows® 95/98 because the operating system does not support services.

Examples

SELECT @@SERVICENAME

  

Here is the result set:

------------------------------

MSSQLServer

  

See Also
MSSQLServer Service Configuration Functions

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.