Get SQL Server Clustering information with DMVs and SELECT statements
Few counters and gotchas for you to look for when you are installing SQL Server clusters, also using SELECT statements & DMVs to get SQL instance information. Such as:
Do not install SQL Server on a compressed drive, by default the installation will fail. For naming the Cluster group within the failover cluster installation that should not include special characters - <,>,',",& and so on. Using the following select statement you can get further information:
select SERVERPROPERTY('IsClustered') as _1_Means_Clustered
, SERVERPROPERTY('ComputerNamePhysicalNetBIOS') as CurrentNode
, SERVERPROPERTY('Edition') as Edition
, SERVERPROPERTY('MachineName') as VirtualName
, SERVERPROPERTY('InstanceName') as InstanceName
, SERVERPROPERTY('ServerName') as Virtual_and_InstanceNames
, SERVERPROPERTY('ProductVersion') as Version
, SERVERPROPERTY('ProductLevel') as VersionNameWithoutHotfixes
Also the following DMVs would be handy too:
select * from sys.dm_io_cluster_shared_drives that will return the information such as drive name of each of the shared drives if the current server instance is a clustered server. If the current server instance is not a clustered instance it returns an empty rowset.
select * from sys.dm_os_cluster_nodes that will return a row for each node in the failover cluster instance configuration. If the current instance is a failover clustered instance, it returns a list of nodes on which this failover cluster instance (formerly ‘virtual server’) has been defined. If the current server instance is not a failover clustered instance, it returns an empty rowset.