25 March,2021 by Tom Collins
I use these queries regularly for Failover clustering
--return each node in the failover failover cluster instance
SELECT NodeName, status, status_description, is_current_owner FROM sys.dm_os_cluster_nodes;
--is the sql server configured in a failover cluster
SELECT SERVERPROPERTY('IsClustered')
--determine the underlying node where the Clustering is currently on
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
--sql server machine name
SELECT SERVERPROPERTY('MachineName')
--sql server instance name
SELECT SERVERPROPERTY('InstanceName')
--sql server server name
SELECT SERVERPROPERTY('ServerName')
--SQL Server in-built function to report nodes of the Cluster
SELECT * FROM fn_virtualservernodes()
--SQL failover cluster instance shared drive
SELECT * FROM fn_servershareddrives()
--SQL failover cluster instance shared drive
SELECT * FROM sys.dm_io_cluster_shared_drives
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |