36.1 C
Monday, June 17, 2024

Exchange Datacenter Switchover

I had to do a Exchange Datacenter Switchover Procedure on a 3 Node Dag. Two on primary site and one on Secondary site.

Primary datacenter needs maintenance and both primary nodes have to go offline. so we had to do a datacenter switchover prior to the primary datacenter maintenance . The procedure is simple if you plan it properly. lets see the aspects we checked. Before the maintenance of the primary datacenter.

  • Made Outbound Mail flow to go via the secondary site.
  • Made MX Records / Inbound Mail flow to come via the secondary site.
  • Public DNS Records changed to the secondary site.

We made sure DAC mode is Enabled with Value DagOnly.It will avoid the split  brain syndrome across these nodes.

Get-DatabaseAvailabilityGroup -Identity DAGNAME | Fl Name,DatacenterActivationMode


To Enable DAC – you can set it with

Set-DatabaseAvailabilityGroup -Identity DAGNAME -DatacenterActivationMode DagOnly

Make sure witness server and Alternate witness server is specified


Make sure no activation block is set on any mailbox servers

To Check

Get-MailboxServer | fl name,DatabaseCopy*


All Activation block has been removed

Get-MailboxServer | Set-MailboxServer –DatabaseCopyAutoActivationPolicy "Unrestricted"


Check where the quorum and move to secondary site

Get-ClusterGroup "Cluster Group"

Its showing my primary site server.


So we moved it to the secondary site

Get-ClusterGroup “Cluster Group” | Move-ClusterGroup –Node SECONDARYSERVERNAME –Verbose


Moved all the active databases to Secondary Server

Get-Mailboxdatabase | Move-ActiveMailboxDatabase –ActivateOnserver SECONDARYSERVERNAME



Stop-DatabaseAvailabilityGroup –Identity DAGNAME  –ActiveDirectorySite "Default-First-Site-Name"

To check your site name

nltest /dsgetsite

To check on Completion

Get-DatabaseAvailabilityGroup –Status

Stopped Dag nodes will be removed from Operational server list.


Now go to your secondary site server – Run

Stop-Service clussvc


Ran below on Secondary site

Restore-DatabaseAvailabilityGroup DAGNAME –ActiveDirectorySite "SECONDARYSITENAME"

Now Alternate witness become active and it formed a single node cluster without the primary site servers and databases stayed active on secondary site as we moved prior.


Opening Failover cluster to verify the same.


Now Primary servers can be safely turned off

Once Maintenance is over in the primary datacenter. Run below

Start-DatabaseAvailabilityGroup DAGNAME –ActiveDirectorySite "Default-First-Site-Name"


Failover Cluster is Back to Normal

If you see witness is not changing back to normal . you can run

Set-DatabaseAvailabilityGroup DAGNAME

Note :

Odd Nodes – no witness server works on node majority

Even Nodes – works with a witness server to act as a node.


Make sure Quorum is moved back to primary site

Get-ClusterGroup "Cluster Group"
Get-ClusterGroup "Cluster Group" | Move-ClusterGroup –Node PRIMARYSERVERNAME –Verbose

Now make sure all copies are healthy or you can update it with

Update-mailboxdatabaseCopy "Databasename\server" –DeleteExistingFiles


Make sure Mail flow and Public DNS changes is done via the primary site.

Datacenter Switch-over process has been successfully completed.

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles


Please enter your comment!
Please enter your name here