Link to home
Start Free TrialLog in
Avatar of barnesco
barnesco

asked on

Command line syntax to initiate a SQL failover in Windows 2012

What is the command line syntax to initiate a SQL 2016 failover from one node to another? I've tried:

cluster group "groupname" /move:nodeName

Thanks
Avatar of 65td
65td
Flag of Canada image

That should have worked, was the command runas as an administrator?
Also so this link:
https://www.mssqltips.com/sqlservertip/2713/sql-server-clustering-management-inside-the-command-line/
Avatar of barnesco
barnesco

ASKER

That's what I thought--yes, I'm running as administrator. It's returning 'cluster' is not recognized as an internal or external command, operable program or batch file.
There are several ways to do that (all of them must be done using one of Nodes of Failover cluster)

  • Open the Failover Cluster Manager, connect to Windows Cluster, right click on the SQL Cluster Name (under 'Services and applications') and then choose 'Move this service or application node to another node')

  • Using the command prompt as you described. The error you faced seems to suggest that you are not running the command from one of the nodes and that machine doesn't have failover clustering feature installed.

  • Restart the active node (this method is least preferred); resources will be shifted to other node automatically.

Also please confirm that you tried using the command prompt or Powershell?
ASKER CERTIFIED SOLUTION
Avatar of 65td
65td
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There isn't a cluster.exe anywhere. The only solution is to use PowerShell.

Strange.

Powershell works as well.

Ensure to run Powershell as admin.