DAG Activation Preference Behavior Change in Exchange Server 2016 CU2


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.
Comments (34)
  1. Eric Twitchell says:

    Is this functionality going to be added to Exchange 2013?

  2. Todd says:

    This is a great addition… one less thing to do after patching cluster nodes. Will this be back ported to Exchange 2013?

  3. Gareth Gudger says:

    Very nice!

  4. @ExchangeITPRo says:

    Cool- another good step.

  5. Bernd Kruczek says:

    But where ist Exchange 2016 CU2????????

  6. Aman Saxena says:

    Nice change in DAG. Thanks, team!

  7. Paul Burgess says:

    Love it, this is big help indeed.

  8. mike crowley says:

    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?

  9. Dmitry Alferov says:

    What about Ex2010?
    Nothing changes?

  10. Kiran.Ramesh says:

    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

    1. This has nothing to do Datacenter Activation Coordination which is designed to prevent split-brain scenarios.

  11. HeloCheck says:

    Wow thanks a lot for this great news indeed!

  12. Umesh Radia says:

    Nice work Ross keep these good changes coming.

  13. Kiran Ramesh says:

    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

  14. HGR says:

    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…

  15. 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?

  16. @Martijn Westera – No, you cannot define a working hour range.

  17. Kiran.Ramesh says:

    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

  18. Kiran.Ramesh says:

    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

  19. John says:

    Another good feature for Exchange Server 2016 :-) Thanks

  20. sime3000 says:

    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

    1. Paul Cunningham says:

      @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.

    2. @sime3000. When you put a MailboxServer into maintenance, you should set the DatabaseCopyAutoActivationPolicy to Blocked. That’ll prevent databases to moving to it.

    3. @sime3000 –
      #1 – see Jared’s response
      #2 – no plans to add this to EAC
      #3 – no, this an Exchange 2016 feature

  21. Kiran.Ramesh says:

    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

  22. Qayoum S says:

    Thanks for sharing.

  23. Hugh says:

    Where can I find the download / more info on CU2?

  24. Dominick says:

    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?

    1. That’s correct. Setting DatabaseCopyAutoActivationPolicy to Blocked will prevent the move.

      1. 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.

  25. Mohammad Athar says:

    Great feature and information. Thanks!!!

  26. Michael says:

    That’s awesome!!! Make life easier for us as the admin.

  27. Gengaiyan says:

    This is very good feature !, we don’t need to worry about rebalancing the databases after patching :)

Comments are closed.

Skip to main content