How to Rebalance Mailbox Databases in an Exchange Server Database Availability Group

After an outage or maintenance to the Exchange 2010 or Exchange 2013, or Exchange 2016Mailbox servers in a Database Availability Group you may find that the mailbox databases are no longer balanced across all of the DAG members.

For example after applying updates to DAG members you may see that all of the mailbox databases are active on a single DAG member.

You can see in the above output that all of the mailbox databases are active on server EX1, even though some of them have EX2 as a preferred server.

Exchange Server 2010 Service Pack 1 shipped with a script that allows you to automatically redistribute mailbox databases to their first activation preference. The script can be found in the Scripts folder of the Exchange Server 2010 installation path, which by default would be C:Program FilesMicrosoftExchangeV14Scripts.

You can use the script to output a report of the current mailbox database distribution among the DAG members.

To rebalance the mailbox databases based on activation preference use the following script parameters.

The outcome of the moves can be seen here. Each mailbox database in the DAG is now active on its preferred server.

Archives