Home » Exchange Server » Using Activation Policies to Prevent Database Copies Mounting in Other Sites

Using Activation Policies to Prevent Database Copies Mounting in Other Sites

A lot of organizations that deploy multi-site database availability groups do so with the intention of using one site for normal production operations, and one for disaster recovery. This design usually leads to a desire to control where database copies can automatically activate, or failover to, when there is a problem with the active copy.

Consider a scenario in which four DAG members have been deployed, with two in the primary site and two in the disaster recovery site. I’ve illustrated a single database with four copies, but in reality there could be several more databases as well. Only one database is required to demonstrate this scenario though, so let’s keep it simple. By default, the database DB01 can failover to any of the available DAG members automatically, including the DR site.

exchange-dag-activation-policies-0

If that is not desirable for the organization, then activation policies on the mailbox servers are commonly used to block automatic activation of the database copies in the DR site.

This doesn’t prevent manual activation of course, so administrators can still make their own decision to “fail over to DR” when necessary.

exchange-dag-activation-policies-1

The problem with the configuration above is that it greatly reduces the number of available database copies for automatic recovery of service in the event of a failure. If DB01 is active on PR-EXCH01 and needs to fail over, and PR-EXCH02 happens to be unhealthy for some reason or is down for planned maintenance, then there’s nowhere for the database to fail over to, and it will go offline instead. Furthermore, even if you do manually switchover to DR-EXCH02 for example, the database is still blocked from failing over to DR-EXCH02 if a second issue arises.

To combat that, some organizations set the DR site to use activation policies of IntrasiteOnly.

That solves one of the two problems, but is still not ideal, in my opinion.

exchange-dag-activation-policies-2

If you’re willing to accept database failing over to the DR site when necessary to maintain service availability, but you prefer the databases be active in the primary site, then you can leave the activation policies set to Unrestricted and set the DatabaseCopyActivationDisabledAndMoveNow property to $true instead. This allows databases to fail over, but they will automatically move back to a healthy database copy on a healthy server that has DatabaseCopyActivationDisabledAndMoveNow set to $false (and is also configured with an activation policy of Unrestricted) when one becomes available, usually within a few minutes.

exchange-dag-activation-policies-3

Paul is a Microsoft MVP for Office Servers and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul is a co-author of Office 365 for IT Pros and several other books, and is also a Pluralsight author.
Category: Exchange Server

20 comments

  1. Mark Dickson says:

    Paul, unless I’m missing something I think you meant to set the activation policy in your preferred configuration as Unrestricted and not IntrasiteOnly.
    This should be:
    Set-MailboxServer DR-EXCH01 -DatabaseCopyActivationDisabledAndMoveNow $true -DatabaseCopyAutoActivationPolicy Unrestricted
    Set-MailboxServer DR-EXCH02 -DatabaseCopyActivationDisabledAndMoveNow $true -DatabaseCopyAutoActivationPolicy Unrestricted

  2. Kim Augustinus says:

    Great post – lot of useful information !

    Question: What if the 2 datacenters is used as DR for each other – how do I best block auto failover for each database, still being able to do a manual failover ?

        • Then I don’t understand your scenario. DAGs are typically deployed in datacenter pairs, in either an Active/Active configuration, or an Active/Passive configuration.

          If it’s Active/Active, both datacenters are able to host active database copies at any time, and usually no activation blocks are used in this case.

          If it’s Active/Passive, one datacenter is designated the “primary”, and one the “secondary” or “DR”. It is the servers in the secondary/DR datacenter that have the activation blocks applied *only if* the organization wants to prevent automatic failovers.

          • Kim Augustinus says:

            Thanks for your reply.

            I’m new to Exchange, and still have at lot to learn – your blog comes in handy here 🙂

            If I have an Office in Singapore and Washington with databases replicated from each Office to Amsterdam (for DR and backup) – how would you design it ?

            Should I have a separate Exchange server for each database in Amsterdam, and then two separate DAG clusters ?

            Thanks for helping the Exchange noob 🙂

          • You’re mixing up some terminology there. If you’re a beginner to these topics then I think some training or study is going to be of more benefit to you than a conversation in these comments. Start with a book or some online training from Pluralsight, or watch some Microsoft Virtual Academy courses to get started.

  3. Damon West says:

    Hi Paul, great stuff! You’re my go-to source for Exchange info. Great Pluralsight courses too! In the IntrasiteOnly example, I’m curious why you left the primary datacenter servers Unrestricted instead of setting them InstrasiteOnly as well.

  4. Sachin Ladde says:

    Hello Paul,

    Nice article!

    I want to restrict one database from auto activating on one server out of 4. How can i achieve this?

    Thank you in advance.

    Regards,
    Sachin

  5. Srinivas says:

    Hi Paul,

    I recently setup DAG on Exchange 2016, on both servers pop & pop BackEnd services are started and running. External URL on virtual directories configured. exported cert from first server (EX01) and imported on second server(Ex02), tested, it is working perfectly.

    My Problem is-
    When DB01 active on EX01 and passive on EX02, I am able to connect mailbox via pop-995, but not if DB01 active on EX02 and passive on EX01.

    Can you please help me?
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *