Search This Blog

Monday, October 15, 2012

SQL Server DBA - T-SQL Queries to find SQL Server Cluster Nodes and Shared Drives


T-SQL Queries to find SQL Server Cluster Nodes and Shared Drives
Find name of the Node on which SQL Server Instance is Currently running

 SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS [CurrentNodeName] 


If the server is not cluster, then the above query returns the Host Name of the Server.
Find SQL Server Cluster Nodes
Using Function

SELECT * FROM fn_virtualservernodes() 


Find SQL Server Cluster Shared Drives
Using Function

SELECT * FROM fn_servershareddrives() 

No comments: