Hi Everyone,
Is there a such windows batch file or script that can monitor the hostname connection alive. If the ping of hostname failed/down, it will auto update the IP address in the windows hosts file.
Example:
In windows/drivers/etc/host
IP address Hostname
192.168.1.100 SQLServer
Let say we do a ping on SQLServer and it failed, batch file will update the IP address from 192.168.1.100 to 192.168.2.100 and now the file should changed to:
192.168.2.100 SQLServer
And again when ping failed on SQLServer, it will auto switch back to 192.168.1.100 SQLServer in the Host file.