
How a DAG keeps mailbox databases available
A Database Availability Group (DAG) is the built-in mechanism Exchange Server uses to provide high availability for mailbox databases. A DAG is a Mailbox server abstraction layered on a Windows Server Failover Cluster: each member hosts one or more copies of a database, and when the active copy fails, Exchange automatically mounts a healthy copy on another member. The unit of failover is the individual database, so a single server can host active databases for some databases and passive copies for others at the same time.
Each database copy has an activation preference number that influences which copy Exchange chooses to activate during a failover. Preference 1 is the preferred active copy; higher numbers are lower-priority failover targets. Setting preferences deliberately across members spreads the active load and ensures a predictable failover order. Without considered preferences, Exchange's automatic choice can concentrate active databases on one server and overload it after a failover.
Quorum, the witness, and why two members is fragile
Because a DAG is built on a failover cluster, it inherits the cluster's quorum rules. A two-member DAG has no quorum if one member fails, so it requires a witness server to provide the third vote. The witness must be a server that is not a DAG member — typically a standalone Exchange server or a third server — and it must be reachable from every DAG member. If the witness is down when a member fails, the surviving member loses quorum and every database dismounts, even though healthy copies exist.
For multi-site DAGs, the witness location matters: place it in the primary data centre so that, during a site partition, the primary site retains quorum and continues serving mail while the DR site cannot mount databases independently. This is the foundation that Datacenter Activation Coordination (DAC) mode builds on to prevent split-brain.
| DAG size | Witness | Quorum behaviour |
|---|---|---|
| 2 members | Required (file-share or cloud) | Witness breaks ties; without it a single failure dismounts all DBs |
| 3 members | Optional | Node Majority; one failure tolerated without a witness |
| 4+ members | Recommended for multi-site | Stable quorum; witness adds resilience to partitions |
Copy and replay queues: the health you must monitor
A passive database copy stays viable as a failover target only if it keeps up with the active copy's log stream. Two queues measure this: the copy queue (log files generated on the active but not yet shipped to the passive) and the replay queue (log files received on the passive but not yet replayed into the database). A growing copy queue points to the replication network or the replication service; a growing replay queue points to disk I/O on the passive node.
A failover to a copy with a large queue will either lose the unshipped logs or take an unacceptable time to mount as it replays the backlog. Monitor both queues continuously and alert before they grow past your recovery objectives, not after. A replay queue that consistently measures in the hundreds of megabytes on a synchronous copy warrants investigation of the passive storage before the next failover depends on it.
Get-MailboxDatabaseCopyStatus * |
Select-Object Name, Status, ActivationPreference,
CopyQueueLength, ReplayQueueLength, ContentIndexState |
Sort-Object CopyQueueLength -Descending |
Format-Table -AutoSizeDAC mode and preventing split-brain across data centres
Datacenter Activation Coordination (DAC) mode is the protection against split-brain in a multi-site DAG. Without it, a network partition between two data centres can let both sites mount the databases independently, producing divergent mail data that cannot be reconciled. DAC mode prevents this by requiring a quorum of DAG members plus the witness before databases are allowed to mount, so only one side of a partition can activate.
Enable DAC mode on every multi-site DAG before you need it. Recovering from an actual split-brain is costly and risky: you must choose one site as authoritative, dismount and discard the divergent copies on the other, and re-seed the discarded site from the authoritative copy. Prevention is far cheaper than recovery.
- Enable DAC mode on every multi-site DAG before a partition happens
- Place the witness in the primary data centre for multi-site DAGs
- Set activation preferences deliberately to spread active load across members
- Block automatic activation on the DR copy so a site failover is deliberate
Written by
Jamshed Alam
Global MSP & IT Infrastructure Consultant with 20 years across Exchange, Microsoft 365, Azure, security and automation. Available for project and contract work worldwide.