July 4, 2023 at 10:33 pm
Case: windows 2019 cluster with 2 nodes and 2 sql server 2019 instances (FCI- NOT Always On) As a result of weekly automated patching both sql instances running on the same node. Task: validate if both sql instances run on the same cluster node and initiate failover of 1 instance to another node. Question: how to initiate manual failover via script/command ? Final goal- create scheduled job to run weekly (after patching completed) to have each sql instance runs on dedicated node.
As far as validation part- seems sys.dm_os_cluster_nodes can help
but cannot find script/command to trigger manual failover of one sql instance to another node.
Thanks
July 5, 2023 at 7:12 am
As it's an FCI the failover is controlled at the WSFC level not SQL, so you will need to write something in PowerShell, using Move-ClusterGroup to move the resource between the needed hosts.
July 5, 2023 at 12:58 pm
Thanks- looks like PS "Move-ClusterGroup" can do the trick
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply