Sql-server – Which is the best approach to “suspend” the activity of a whole AOG cluster thinking on start it again later

availability-groupsclusteringmaintenancesql server

My company is going to migrate some services from one on-prem site to another but the database servers will remain in the same location (for now).

I've been asked for "suspend" all the activity of the three AOG cluster nodes (all secondary instances are readable without routing), during a long maintenance window.

Two main options are coming to my mind:

  1. Maybe not the fanciest. Suspend data movement and then stop SQL Engine service at the secondary replicas first and then stop the primary at the end. When the time to start services comes, start the primary first and the secondaries later in inverse order and resume data movement at the end.
  2. Disable jobs and intended logins at all instances to enable them again later keeping all AOG activity running but without user access.

I know the "best option" is completely relative to the context, but I would like to read some opinions.

Thank you,

Best Answer

You don't need to suspend data movement, but otherwise what you've written for option #1 is a good approach! Before doing anything, I would disable automatic failovers on all replicas, to prevent any unexpected failovers when you bring the AG back up.

Then, as you said, shut down the secondaries first, then shut down the primary.

When you bring the primary back up, it should come online as the primary again. Then bring up the secondaries.

Make sure to turn automatic failovers back on once everything is stable, if you had it on in the first place.