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

switch from Synchronous to ASynchronous on secondary_lag_seconds in always on.

$
0
0

Env:
SQL Server 2016 ent edition.
Windows 2016

We are currently using the ASynchronous mode in our AG. 
We want to use Synchronous. 
However, if the lag between the primary and secondary increases, we would like to use automation to switch again from Synchronous to ASynchronous. I could not find any option in the flexible failover policy.
I can use the DMV (sys.dm_hadr_database_replica_states) to query the column Secondary_Lag_Seconds through a job. 
However a job is a polling mechanism. 
Looking for some event based automation which will check in a real time if there is latency and switch back and forth between the Sync and Async. 


Viewing all articles
Browse latest Browse all 4689

Trending Articles



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