Mailbox databases and database availability groups

MS-202 · Manage modern messaging infrastructure · Updated

Databases and DAGs are the core of Exchange Server availability. Expect scenario questions that ask which command or setting to use.

Database tasks

TaskCmdlet
Move the .edb and log filesMove-DatabasePath -Identity MailDB1 -EdbFilePath F:\Databases\MailDB1.edb -ConfigurationOnly $false
Move mailboxes between databasesNew-MoveRequest
Remove a databaseRemove-MailboxDatabase (then delete the files by hand)
List mailboxes still in a databaseGet-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:

FeatureWhat it protectsKey setting
Shadow redundancyMessages in transit to the next hopShadowRedundancyEnabled, MessageExpirationTimeout
Safety NetMessages already delivered to the databaseSafetyNetHoldTime (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.

MS-202 course outline

All 6 lessons · Course overview
  1. Prepare Active Directory for Exchange Server 2019Manage modern messaging infrastructure Free
  2. Mailbox databases and database availability groupsManage modern messaging infrastructure Free
  3. Send connectors, Receive connectors and routingManage mail flow topology Full access
  4. Anti-spam, transport agents and Defender for Office 365Manage mail flow topology Full access
  5. Recipient types, auditing, archive and holdsManage recipients and devices Full access
  6. Exchange hybrid deployment and free/busy sharingPlan and implement migration and hybrid Full access