Mailbox databases and database availability groups
Databases and DAGs are the core of Exchange Server availability. Expect scenario questions that ask which command or setting to use.
Database tasks
| Task | Cmdlet |
|---|---|
| Move the .edb and log files | Move-DatabasePath -Identity MailDB1 -EdbFilePath F:\Databases\MailDB1.edb -ConfigurationOnly $false |
| Move mailboxes between databases | New-MoveRequest |
| Remove a database | Remove-MailboxDatabase (then delete the files by hand) |
| List mailboxes still in a database | Get-Mailbox -Database MailDB1 -Arbitration and similar |
Move-DatabasePath dismounts the database while files move, so users lose access for a short time. With -ConfigurationOnly $true only the path in Active Directory changes, which is for when you moved the files already.
Before removal, the database must hold no mailboxes. That includes arbitration, audit log and discovery search mailboxes. Move them with New-MoveRequest, then remove the database.
Database availability group (DAG)
A DAG is a set of up to 16 Mailbox servers that share database copies. Each database has one active copy and up to 15 passive copies. Failover is automatic when the active copy fails and a healthy copy exists.
Key design points:
- Run at least three copies for important data, with at least one lagged copy as protection against corruption or deletion.
- A lagged copy delays log replay (ReplayLagTime, up to 14 days). Normal copies use 0.
- A DAG uses a witness server (or Azure cloud witness) for quorum when the member count is even.
- All members must run the same Windows Server version.
Transport resilience
Two transport features protect mail during a failure:
| Feature | What it protects | Key setting |
|---|---|---|
| Shadow redundancy | Messages in transit to the next hop | ShadowRedundancyEnabled, MessageExpirationTimeout |
| Safety Net | Messages already delivered to the database | SafetyNetHoldTime (default 2 days) |
Safety Net keeps a copy of delivered messages. After a failover to a lagged copy, Exchange resubmits those messages, so the hold time must be longer than the replay lag time. A six-day lag needs a hold time above six days.
Sizing and editions
Standard edition servers can mount 5 databases. Enterprise edition can mount 100. When a scenario needs many databases, or one per office, check that the edition supports it.
Exam traps
- -ConfigurationOnly $true does not move any files.
- eseutil /p is a repair tool and is not used to remove a healthy database.
- Shadow redundancy covers mail in transit, Safety Net covers mail already delivered.
- Increasing MessageExpirationTimeout does not help after a database failover.
- A lagged copy is a short-term recovery option and does not replace backups.
Practice questions
Choose an answer, then review the explanation to check your understanding.
1. You must move the files of database MailDB1 to a new drive on the same server. Which switch makes sure the files are physically moved?
Show answer
Answer: B.Move-DatabasePath with -ConfigurationOnly $false dismounts the database and moves the .edb file. $true only changes the configuration.
2. You try to remove a mailbox database. All user mailboxes are on other servers, yet Exchange says mailboxes remain. What do you do first?
Show answer
Answer: B.System mailboxes such as arbitration mailboxes still live in the database and block removal until they are moved.
3. A DAG has a lagged copy with a replay lag of six days. You want to reduce the chance of losing messages after a failover. Which value do you change?
Show answer
Answer: B.Safety Net resubmits recently delivered messages after a failover. SafetyNetHoldTime must be longer than the lag, so increase it.
4. How many databases can a Standard edition Exchange Server 2019 server mount?
Show answer
Answer: A.Standard allows up to 5 databases, Enterprise up to 100.