How to find the name of the physical server

Quite often I ask the question: “Which node is this instance running on right now?” – in a clustered environment. Or ‘What is the name of the physical server where this SQL Server instance is installed?’

Well, here is the answer:

-- Physical server name on which the instance is running
SELECT  SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS ServerName

The query above will answer the questions. It displays the name of the physical machine.

 

Comments are closed.