multiple way to find server name
-Windows computer name on which the server instance is running.
-For a clustered instance, an instance of SQL Server running on a virtual server on Microsoft Cluster Service, it returns the name of the virtual server.
-NULL = Input is not valid, or an error.
SELECT SERVERPROPERTY('MachineName') AS MachineName
GO
-Both the Windows server and instance information associated with a specified instance of SQL Server.
SELECT SERVERPROPERTY('ServerName') AS ServerName
GO
-NetBIOS name of the local computer on which the instance of SQL Server is currently running.
-For a clustered instance of SQL Server on a failover cluster, this value changes as the instance of SQL Server fails over to other nodes in the failover cluster.
-On a stand-alone instance of SQL Server, this value remains constant and returns the same value as the MachineName property.
Select SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as PhysicalName
Go
-Returns the name of the local server running SQL Server.
SELECT @@SERVERNAME AS ServerNameGlobalVar
GO
Sarvesh, if this helps please login to Mark As Answer. | Alert Moderator