Shut Down Exchange 2010 DAG member

05May

by Gil Kreslavsky ..

While performing maintenance to Exchange 2010 DAG server you should first remove the DAG member from DAG group.Other wise you may have unwanted DB failovers and many other unexpected issue that may affect company mail services availability

Shutting Down DAG Members

The Exchange 2010 high availability solution is integrated with the Windows shutdown process. If an administrator or application initiates a shutdown of a Windows server in a DAG that has a mounted database that’s replicated to one or more DAG members, the system attempts to activate another copy of the mounted database prior to allowing the shutdown process to complete.

However, this new behavior doesn’t guarantee that all of the databases on the server being shut down will experience a lossless activation. As a result, it’s a best practice to perform a server switchover prior to shutting down a server that’s a member of a DAG.

The correct way to perform any maintenance is to run first StartDagServerMaintenance.ps1 script that is located under “C:\Program Files\Microsoft\Exchange Server\V14\scripts”
This script moves all the active databases to next preferred DAG server and prevents active databases from moving to that server during the maintenance.
In addition the script ensures that all critical DAG support functionality that may be on this server has been moved to next proffered server

To run the script open EMC
Type:cd $exscripts
StartDagServerMaintenance.ps1 -server YourServername

The script performs the following tasks on the background:

Runs the Suspend-MailboxDatabaseCopy cmdlet for each database copy hosted on the DAG member with activationonly parameter .

Pauses the node in the cluster, which prevents the node from being and becoming the PAM.

Sets the value of the DatabaseCopyAutoActivationPolicy parameter on the DAG member to blocked

Moves all active databases currently hosted on the DAG member to other DAG members.

If the DAG member currently owns the default cluster group, the script moves the default cluster group (and therefore the PAM role) to another DAG member.

If any of the preceding tasks fails, all operations, except for successful database moves, are undone.

After the maintenance is complete and the DAG member is ready to return to serve clients you need to run the following script:

cd $exscripts
StopDagServerMaintenance.ps1 -server YourServername

The script performs the following tasks on the background:

Runs the Resume-MailboxDatabaseCopy cmdlet for each database copy hosted on the DAG member.

Resumes the node in the cluster, which enables full cluster functionality for the DAG member.

Sets the value of the DatabaseCopyAutoActivationPolicy parameter on the DAG member to Unrestricted

I highly recommend using Start/StopDagServerMaintenanceInstalling maintainance scripts before any action that requiers server Reboot/ShutDown or Update Rollups instalation.

Share this:

Like this:

6 responses to “Shut Down Exchange 2010 DAG member”

Kris

07/21/2011 at 1:05 AM

Great article. Please correct me if I am wrong. Don’t you run a STOPDagServerMaintenance to suspend -mailbox database copy & after the server is cycled, you run the STARTDagServer command to resume the mailbox database copy?

HI Kris;
when you run StartDagServerMaintenance script this script will suspend the database copy and stop the replication activity becasue this script include Suspend-MailboxDatabaseCopy cmdlet .
after the maintenance for the server has been finished ; you have to run StopDagServerMaintenance script which will activtae the database copy and because its incule Resume-MailboxDatabaseCopy cmdlet

Does the Start maintenance mode script suspend database copy or only suspend activation? We need to shut down one of our dag servers overnight while some electrical maintenance is being performed, and want to know will the maintenance mode script be sufficient or will it be necessary to suspend-mailboxcopy for the server we are shutting down.

My DAG have 2 member servers and 1 witness server and there is a electrical maintenance tonight that I need to shut down all above servers.
I schedule to shut down the InActive member, then witness server, then the active member. Should I run the script StartDagServerMaintenance.ps1 & StopDagServerMaintenance.ps1 at which step?

No .
I think you should dismount all database manually. Then shut down the servers one by one.
You should power on the servers on the following sequence :
First, the witness server
Then the 1st exchange node . Then the second.