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
Windows OSWindows Server 2012SQL

Avatar of undefined
Last Comment
65td

8/22/2022 - Mon
65td

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/
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.
Ora_Techie

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?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
65td

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
barnesco

ASKER
There isn't a cluster.exe anywhere. The only solution is to use PowerShell.
65td

Strange.

Powershell works as well.

Ensure to run Powershell as admin.