Get Basic Cluster Information
Applicability:
SQL Server 2000: Not Supported
SQL Server 2005: Tested
SQL Server 2008: Tested
SQL Server 2008R2: Tested
SQL Server 2012: Not Tested
Credits:
Author: Unknown
Date: 14 May 2009
Description
Retrieve the cluster active node, plus a list of nodes and shared drives available.
It is very basic information, but easier than grabbing time from the DBA if cluster manager is locked down (as it should be).
Code
cellPadding=0 width=876>
PRINT ' **** Cluster Information ****'
PRINT ' '
PRINT ' The following is information on the cluster you are connected'
PRINT ' '
PRINT '... Name of all nodes used and are part of this failover cluster'
SELECT NodeName As Cluster_Node_Name FROM sys.dm_os_cluster_nodes
PRINT ' '
PRINT '... Node which is the active '
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS Active_Node_Name
PRINT ' '
PRINT '... Drive letters that are part of the resourse group which contain the data and log files'
SELECT DriveName as Shared_Drive_Name FROM sys.dm_io_cluster_shared_drives