MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

DAG Maintenance on Exchange 2010 SP1

This article outlines the process of putting your DAG members in maintenance mode prior to any activity.

The process is pretty easy but to know how to perform is what I am going to  outline.

Run a script to put a DAG member into maintenance mode, moving the active databases off the server. After maintenance has been completed, you run another script to take the server out of maintenance mode and then you can redistribute the databases across the DAG. Read on…..

1. Run the StartDagServerMaintenance.ps1 script to put the DAG member in maintenance mode

When you run this script, it moves all the active databases to other DAG members. It pauses the node in the cluster, and sets the DatabaseCopyAutoActivationPolicy mailbox server setting to Blocked. The Suspend-MailboxDatabaseCopy cmdlet is run for each database hosted by the DAG member, and the cluster core resources will be moved to another server in the DAG if needed.

[PS] C:\Program Files\Microsoft\Exchange Server\V14\scripts>.\StartDagServerMaintenance.ps1 -serverName testmbx-dag1

2. Run the StopDagServerMaintenance.ps1 script to take the DAG member out of maintenance mode

After maintenance is complete, run this script to take the server out of maintenance mode. It will run the Resume-MailboxDatabaseCopy cmdlet for each database its hosting, resume the node in the cluster, and set the DatabaseCopyAutoActivationPolicy setting to Unrestricted.

[PS] C:\Program Files\Microsoft\Exchange Server\V14\scripts>.\StopDagServerMaintenance.ps1 -serverName testmbx-dag1

You can run these scripts remotely from another server with the Exchange tools installed and specify the DAG member using the serverName parameter. Just make sure that the server you are running the scripts from has the Windows Failover Cluster Management tools installed.

3. Run RedistributeActiveDatabases.ps1 script to re-balance the active database copies across the DAG

Finally, you can run this script to redistribute the active mailbox databases across the DAG. There are two options for balancing active database copies within a DAG: by activation preference and by site and activation preference.

[PS] C:\Program Files\Microsoft\Exchange Server\V14\scripts>.\RedistributeActiveDatabases.ps1 -DagName TESTMBX-DAG -BalanceDbsByActivationPreference -ShowFinalDatabaseDistribution -Confirm:$false

When using the BalanceDbsByActivationPreference parameter the script tries to move the databases to their most preferred copy based on activation preference, regardless of the AD site. If you use the BalanceDbsBySiteAndActivationPreference parameter, the script will attempt to active the most preferred copy and also try to balance them within each AD site.

There are a number of parameters that can be used with this script. Run get-help .\RedistributeActiveDatabases.ps1 for more details. Also, all of these scripts are documented in Managing Mailbox Database Copies and Managing Database Availability Groups on TechNet.

-
Swaminathan
Team @ MSExchangeGuru

One Response to “DAG Maintenance on Exchange 2010 SP1”

  1. construction Says:

    I have learn some good stuff here. Definitely value bookmarking for revisiting. I wonder how much effort you place to make the sort of wonderful informative site.

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.