SQL Server - Cluster Queries

ben himself's picture

Clustered State

SELECT SERVERPROPERTY('IsClustered') [is_clustered?]

Active Node

SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') [active_node_name]

Get Passive Node

	SELECT NodeName  AS 'Passive_Node'
	FROM sys.dm_os_cluster_nodes
	WHERE NodeName NOT IN (
		SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
	)

Tags: 

Categories: