We have two SQL Server nodes running in an AlwaysOn Availability Group. I'm looking for some suggestions and/or best practices on how to temporarily suspend connection or prevent users from connecting the Availability Group?
I was thinking to pause SQL Server running on the primary node and this will prevent new connections. If I did that, would it failover to the secondary?
Basically, we have new AG running in Azure. We will pick a date and switch from on-prem to Azure. After the switch, we don't want new connections to on-prem. However, if there are issues after the switch, we need to be able to fall back to on-prem and resume the operations just like before.
What's the best way to handle this?
Just to clarify, we created two SQL VMs in Azure. We built these two nodes to match exactly how it is running in on-prem. On cutover day, we will update DNS to point to the Azure listener. In theory, no users should be able to connect to the on-prem AG after this DNS update.
But we just want to be absolutely 100% sure all client connections will point to Azure and absolutely zero connection to on-prem. At the same time, we need the most efficient and safest way to fall back to on-prem should something goes wrong in Azure.
We are not looking to deviate what we have built. We are just looking for the best and most efficient way to stop connections to on-prem after the switch. I could configure on-prem AG to do "manual failover" and pause SQL server on the primary replica. I think that should take care of that. Just not sure if this recommended or there's better way.
Azure runs SQL Server 2019 while on-prem is 2017.