0

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,

2
  • Why do you need to stop the databases if you're not moving them? There won't be much database activity if all applications using it are shut down. Also, when shutting down the entire database cluster, one would normally stop the primary first, then secondaries, and start them up in the opposite order (secondaries first, then primary). – mustaccio Dec 3 '20 at 0:33
  • Thank you for answering @mustaccio, They want to keep unavailable the databases because there are some partner's applications that are being migrated and they don't want unexpected reads of the legacy ones (business things). Shutting down the primary wouldn't raise a failover event? That is why I thought in the secondary replicas first. – Roman Peralta Dec 3 '20 at 1:31
1

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.

1
  • I've had forgotten the automatic failover. Thank you Josh, great advice! – Roman Peralta Dec 3 '20 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.