Microsoft SQL Server Getting started with Microsoft SQL Server Retrieve Basic Server Information



Returns the version of MS SQL Server running on the instance.


Returns the name of the MS SQL Server instance.


Returns the name of the Windows service MS SQL Server is running as.

SELECT serverproperty('ComputerNamePhysicalNetBIOS');

Returns the physical name of the machine where SQL Server is running. Useful to identify the node in a failover cluster.

SELECT * FROM fn_virtualservernodes();

In a failover cluster returns every node where SQL Server can run on. It returns nothing if not a cluster.