I have a scenario with the three nodes with server 2012 standard, each running an instance of SQL Server 2012 enterprise, participate in asingle Windows Server Failover Cluster (WSFC) that spans two data centers.
If the nodes in the primary data center are unavailable due to data center outage. Then how I can able to access node in the WSFC (Windows Server Failover Cluster) in the secondary disaster recovery data center automatically with some script.
- I want to write script that can be able to check primary data center by pinging some IP after every 5 or 10 minutes.
- If that IP is unable to respond then script can be able to Perform Forced Manual Failover of Availability Group (SQL Server) and WSFC (Windows Server Failover Cluster)
Can you please guide me for script writing for automatic failover in case of primary datacenter outage?