Thursday, December 13, 2012

Useful Commands for SQL Server Cluster

Below command is to view that SQL Server is a clustered or standalone

WITH prop_cte (cluster_prop)
(SELECT SERVERPROPERTY('Isclustered') as cluster_prop)
SELECT CASE WHEN cluster_prop = 0 THEN 'Stand Alone' ELSE 'Clustered' end FROM prop_cte

SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')  -- This displays on which cluster node SQL Server is running.

Select * from sys.dm_os_cluster_nodes  -- Displays nodes of the current SQL Server

 select * from sys.dm_io_cluster_shared_drives -- Displays cluster shared drives information from

No comments: