SQL Server Clustering Management inside the command line
By: Brady Upton | Updated: 2012-06-18 | Comments (6) | Related: More > Clustering
Experienced SQL DBA's know their way around Failover Cluster Manager fairly well. The graphical tool is a great, but what kind of management tasks can I do when my Failover Cluster Manager freezes or something prevents me from starting the program? In this tip we cover a few of the command line options for getting cluster status as well as for failing over.
There are numerous commands you can run to manage a SQL Cluster from the command line. Below I'll show you a few of these that include status checks and how to failover.
How to View SQL Clusters
This can be run from your workstation to view all SQL Clusters on the network you are connected to.
View Status of Nodes
You can run this to view the status of all nodes in the cluster.
cluster node --or cluster node /status
View Status of Cluster Groups
You can run this to view the status for all cluster resource groups.
cluster group --or cluster group /status
View Status of Cluster Networks
You can run this to view the cluster networks status.
cluster network --or cluster network /status
View Properties of All Network Interface Devices
You can run this to view the status for all network interface devices.
cluster netinterface --or cluster netinterface /status
View Status of Cluster Resources
You can run this to get a listing of all available cluster resources.
cluster resource --or cluster resource /status
Failover Service to a New Node
You can run this to initiate a failover.
cluster group "groupname" /move:nodeName
In the figure above you can see where "SQL Server (ECS)" was moved to "TSTPSSQLCL04".
- This tip only showed a few of the commands you can run against a SQL Server Cluster. To find more command you can run this command "cluster /?"
- To view more tips about SQL Server Clustering check out the MSSQLTips library
Last Updated: 2012-06-18
About the author
View all my tips