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.
↧
switch from Synchronous to ASynchronous on secondary_lag_seconds in always on.
↧