Database Server and Node Information
IF SERVERPROPERTY('IsClustered') = 1
BEGIN
SELECT @@SERVERNAME SQLName,
'Yes' [Cluster?],
(
SELECT SUBSTRING(
(
SELECT ', '+NodeName
FROM sys.dm_os_cluster_nodes
FOR xml PATH('')
), 3, 8000)
) NodeName;
END;
ELSE
BEGIN
SELECT @@SERVERNAME SQLName,
'No' [Cluster?],
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') NodeName;
END;
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home