Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4532

PowerShell Script to Check Remote Server Ping and Trigger SQL AOAAG Failover if remote server is down

$
0
0

Hi,

our requirement is to have a powershell script that checks ping status of a remote server and trigger or execute MSSQL AOAag Failover using powershell script.

to begin with I have this below script that pings the remote server, so if reply fails then we want to execute db failover. how to do? the script will run on MSSQL AOAAG itself

=============

Test-Connection-ComputerNamens1-xms1.dm.com

if fails

then execute db failover.

=================================


Viewing all articles
Browse latest Browse all 4532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>