08 June 2019

Basic Server Information


SELECT @@VERSION
--Returns the version of MS SQL Server running on the instance.

SELECT @@SERVERNAME
--Returns the name of the MS SQL Server instance.

SELECT @@SERVICENAME
--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.

No comments:

Post a Comment

Resource Governor

Resource Governor  is a feature that you can use to manage SQL Server workload and system resource consumption. Resource Governor enables y...