Hello Geeks and welcome to the Day 12 of the long series of One DMV a day. In this series of blogs I will be exploring and explaining the most useful DMVs in SQL Server. As we go ahead in this series we will also talk about the usage, linking between DMVs and some scenarios where these DMVs will be helpful while you are using SQL Server. For the complete list in the series please click here.
Since yesterday we have started talking about OS related DMVs. Today I will talk about one more useful DMV for DBAs. In most cases the DBA is not given RDP access to machine on which SQL Server is installed. Especially production servers. So there is always few questions which you want to answer like what are the nodes in my cluster. Sys.dm_os_cluster_nodes is your answer.
Due to some security compliances few companies follow a DBA may not have remote access to the windows servers. In those cases it is hard for DBA to troubleshoot or even answer few simple questions. What are the nodes, is my SQL server on the right node, where can it failover?
Sys.dm_os_cluster_nodes has been introduced in SQL Server 2005 when the DMVs were introduced. But till 2008 R2 it only provided the node names and no additional information. In 2012 they have introduced the below additional columns which are very useful in the above scenario. In case of stand-alone machines the DMV does not return any results
Sys.dm_os_cluser_nodes exposes this information.
NodeName – Nodes in the cluster
Status and Status_description –
Is_current_owner – 1 if this is the owner of the current instance. Else 0
SELECT * FROM sys.dm_os_cluster_nodes
Tomorrow I will talk about another OS related DMV. So, stay tuned. Till then