DAG Activation Preference Behavior Change in Exchange Server 2016 CU2
Published Jun 16 2016 07:00 AM 56K Views
Microsoft

Every copy of a mailbox database in a DAG is assigned an activation preference number. This number is used by the system as part of the passive database activation process, and by administrators when performing database balancing operations for a DAG. This number is expressed as the ActivationPreference property of a mailbox database copy. The value for the ActivationPreference property is a number equal to or greater than 1, where 1 is at the top of the preference order. When a DAG is first implemented, by default all active database copies have an ActivationPreference of 1. However, due to the inherent nature of DAGs (e.g., databases experience switchovers and failovers), active mailbox database copies will change hosts several times throughout a DAG's lifetime. As a result of this inherent behavior, a mailbox database may remain active on a database copy which is the not the most preferred copy. Prior to Exchange 2016 Cumulative Update 2 (CU2), Exchange Server administrators had to either manually activate their preferred database copy, or use the RedistributeActiveDatabases.ps1 script to balance the databases copies across a DAG. Starting with CU2 (which will be releasing soon), the Primary Active Manager in the DAG performs periodic discretionary moves to activate the copy that the administrator has defined as most preferred is now built into the product. A new DAG property called PreferenceMoveFrequency has been added that defines the frequency (measured in time) when the Microsoft Exchange Replication service will rebalance the database copies by performing a lossless switchover that activates the copy with an ActivationPreference of 1 (assuming the target server and database copy are healthy).

Note: In order to take advantage of this feature, ensure all Mailbox servers within the DAG are upgraded to Exchange 2016 CU2.

By default, the Replication service will inspect the database copies and perform a rebalance every one hour. You can modify this behavior using the following command:

Set-DatabaseAvailabilityGroup <Name> -PreferenceMoveFrequency <value in the format of 00:00:00>

To disable this behavior, configure the PreferenceMoveFrequency value to ([System.Threading.Timeout]::InfiniteTimeSpan). If you are leaving the behavior enabled, and you have created a scheduled task to execute RedistributeActiveDatabases.ps1, you can remove the scheduled task after upgrading the DAG to CU2. We recommend taking advantage of this behavior to ensure that your DAG remains optimally balanced. This feature continues our work to improve the Preferred Architecture by ensuring that users have the best possible experience on Exchange Server. As always, we welcome your feedback. Ross Smith IV Principal Program Manager Office 365 Customer Experience

Updates

  • 6/21/16: Updated information on how to disable PreferenceMoveFrequency without requiring a Replication service restart. If you set it to [Timespan]::Zero, you will need to cycle the Replication service.
34 Comments
Not applicable
Is this functionality going to be added to Exchange 2013?
Not applicable
This is a great addition... one less thing to do after patching cluster nodes. Will this be back ported to Exchange 2013?
Not applicable
This is great news. Thanks, team!
Not applicable
Very nice!
Not applicable
Cool- another good step.
Not applicable
But where ist Exchange 2016 CU2????????
Not applicable
Nice change in DAG. Thanks, team!
Not applicable
Love it, this is big help indeed.
Not applicable
So for all the shops that left everything default (paid no attention to activation preference), they'll come in one day to find all their active copies moved around, potentially on their oldest server? Is this default on upgrades as well as new deployments?
Not applicable
What about Ex2010?

Nothing changes?

Not applicable
Hello Ross,

Correct me if I am wrong, If I have DAC mode enabled in the environment. Will the PreferenceMoveFrequency value overide the DAC mode settings & issue PAM to in the DAG to perform periodic discretionary moves to activate the copy on the preferred server. Kindly let me know.

Thanks

Kiran

Not applicable
This has nothing to do Datacenter Activation Coordination which is designed to prevent split-brain scenarios.
Not applicable
Wow thanks a lot for this great news indeed!
Not applicable
Nice work Ross keep these good changes coming.
Not applicable
Hello Ross,

Correct me if I am wrong, If I have DAC mode enabled in the environment. Will the PreferenceMoveFrequency value overide the DAC mode settings & issue PAM to in the DAG to perform periodic discretionary moves to activate the copy on the preferred server. Kindly let me know.

Thanks

Kiran Ramesh

Not applicable
Do we have an option to set a start time for redistribute? or time slot ?

This could be useful during datacenter maintenance or planned reboot.

Disable this option / restart replication service and enable it again each time will be very long...

Not applicable
Nice behavior!

However, a lot of (on-premises) customers run Virtualized or Remote Desktop Services (RDS) (Terminal Services) environments with Outlook in Online Mode. Activating preferred database copies with Outlook in Online Mode results in (very) short interruption. Most customers do this during evening hours. But it is not possible to configure PreferenceMoveFrequency to only perform during evening hours?

Not applicable
@Martijn Westera - No, you cannot define a working hour range.
Not applicable
Correct me if I am wrong, If I have DAC mode enabled in the environment. Will the PreferenceMoveFrequency value overide the DAC mode settings & issue PAM to in the DAG to perform periodic discretionary moves to activate the copy on the preferred server. Kindly let me know.

Thanks

Kiran Ramesh

Not applicable
Hello Ross,

Correct me if I am wrong, If I have DAC mode enabled in the environment. Will the PreferenceMoveFrequency value overide the DAC mode settings & issue PAM to in the DAG to perform periodic discretionary moves to activate the copy on the preferred server. Kindly let me know.

Thanks

Kiran Ramesh

Not applicable
Another good feature for Exchange Server 2016 :) Thanks
Not applicable
This should have been part of Exchange long ago but thanks for adding it now. A couple of questions:

1. What's the strategy for server maintenance now ? i.e. you activate ServerX's active db copies elsewhere, the server is undergoing maintenance for several hours and the new behavior in CU2 keeps reactivating the copies on ServerX which is not what you want of course. Do we need to set and undo ([TimeSpan]::Zero) on every server in the DAG every time we want to do server maintenance?

2. Will -PreferenceMoveFrequency be available in the GUI as well or is this yet another setting we'll need to remember or look up.

3. Will this be added to Exchange 2013 at some point ?

Thanks

Not applicable
@sime3000 -

#1 - see Jared's response

#2 - no plans to add this to EAC

#3 - no, this an Exchange 2016 feature

Not applicable
@sime3000. When you put a MailboxServer into maintenance, you should set the DatabaseCopyAutoActivationPolicy to Blocked. That'll prevent databases to moving to it.
Not applicable
@sime3000 - when you place the server into maintenance mode it will prevent that server's database copies from activating while you are performing your maintenance. I'm not sure if my comment will get quarantined if I post a link, but the steps are easy to find via Google/Bing etc.
Not applicable
If I have DAC mode enabled in the environment. Will the PreferenceMoveFrequency value overide the DAC mode settings & issue PAM to in the DAG to perform periodic discretionary moves to activate the copy on the preferred server. Kindly let me know.

Thanks

Kiran Ramesh

Not applicable
Thanks for sharing.
Not applicable
Where can I find the download / more info on CU2?
Not applicable
I assume that these activation's will not trump an activation block put on a server? So if I temporarily activation block a server that has DB's with activation preference 1, with the PAM force an activation?
Not applicable
That's correct. Setting DatabaseCopyAutoActivationPolicy to Blocked will prevent the move.
Not applicable
Since Exchange 2013, setting DatabaseCopyActivationDisabledAndMoveNow should be self-sufficient to move active database copies (event though it's often wiser/faster to do that manually) AND prevent switchback. Setting DatabaseCopyAutoActivationPolicy to Blocked is more the Exchange 2010 way... or am I missing something here? That plus the fact that the HA component is also set as Inactive.
Not applicable
Great feature and information. Thanks!!!
Not applicable
That's awesome!!! Make life easier for us as the admin.
Not applicable
This is very good feature !, we don't need to worry about rebalancing the databases after patching :)
Version history
Last update:
‎Jul 01 2019 04:27 PM
Updated by: