Microsoft Exchange Server Database Corruption: Email Recovery Guide
Our founder and lead technician, Joseph Montanti, handles cases personally.
If an Exchange mailbox database won't mount, preserve its EDB file and matching transaction logs before running a repair. For a dirty shutdown, Exchange database recovery starts by replaying the required logs into a working copy. If those logs are missing, look for a consistent backup or another database copy before considering hard repair. Running eseutil /p on the only EDB can cost you the messages you're trying to bring back.
On this page
What Exchange needs from the server
The EDB holds mailbox folders, messages, attachments and other mailbox items. Exchange's Extensible Storage Engine writes transactions to logs before all their changes reach the database pages on disk. If power goes out after the log write but before the page write, the logs give the engine the information it needs to finish. That is what Dirty Shutdown means in this context. An untidy shutdown and a damaged database page are two different problems.
Leave the original database in place. Don’t delete transaction logs to free space, move the active EDB during recovery or keep retrying a failed mount. If the storage is failing, leave the server off if it has shut down, skip rebooting and pause copy and repair attempts.
On stable storage, preserve the offline database, its entire log folder including reserved .jrs logs and the checkpoint file together. The log directory may be on a different volume from the EDB. Keep a separate untouched set while you work from the restored copy. For a live system, use an Exchange-aware backup, which coordinates with the Exchange Volume Shadow Copy Service writer. Copying a changing EDB in Explorer can collect database pages and logs from different points in time. Microsoft's Exchange-aware backup procedure.
If the storage repeatedly drops out or reading the EDB returns disk I/O errors, end the database work and address the storage first. An unverified EDB repair utility can change the original, and a second hard repair won't obtain pages the RAID or disk can't read. robocopy /B selects backup mode for file permissions. It has no special ability to read a bad sector. Preserve an available earlier backup or healthy database copy while the affected media is assessed. Microsoft's Robocopy switch reference.
Read the header and the ESE error
From the Exchange tools on your recovery system, inspect the dismounted working copy with eseutil /mh "E:\RDB\Database\Mailbox.edb". Use the path to your copied EDB. Look at State and Log Required. The required range tells you which log generations belong with that copy to bring it to a clean state. This header read gives you a better starting point than the “Trying to connect” message on every Outlook workstation.
| Finding | What it tells you | Next move |
|---|---|---|
| Dirty Shutdown, required log generations available | Changes in the logs still need to be applied to this database | Use the correct log stream on the working copy. |
| Dirty Shutdown, required log missing | There is a gap in the sequence for this EDB | Look for that generation in the matching backup or an intact database copy. |
| Clean Shutdown, database still fails to mount | Transaction replay is no longer the obvious cause. The mount error can concern a page, configuration or the restore environment. | Read the specific Exchange/ESE error and check the database and destination paths. |
| Header unreadable or a 0-byte EDB | The copy may be truncated, inaccessible or on unreadable storage | Check the copy against the source backup and any independent replica before trying structural repair. |
The numbers in the event log narrow it down further. -1018 (JET_errReadVerifyFailure) is a page checksum error. ESE read a page whose contents didn't match its checksum. -1019 is a blank database page where one was expected. -1022 is a disk I/O error. Those are different findings, and they deserve different responses. Log replay can finish outstanding transactions. It can't recreate an arbitrary damaged historical attachment simply because today's logs are complete. Microsoft's ESE error codes.
Soft recovery with the matching log files
- Restore the files to separate storage or use a working duplicate of the preserved set. Confirm which prefix belongs to this database. A directory full of E01 logs from a different database will not complete an E00 log stream.
- Use the prefix and paths for the working set. For example,
eseutil /R E01 /l E:\RDB\Logs /s E:\RDB\Checkpoint /d E:\RDB\Databasereplays the copied E01 logs using the checkpoint in Checkpoint and the EDB in Database. Microsoft’s out-of-place replay instructions identify the three directories. - Read the copied header again. Once State says Clean Shutdown, use a recovery database to mount the copy and extract the mailbox. If replay calls for a missing generation, go back to the backup set for the matching file. Renaming a later log to fill the gap won't supply the missing transactions.
Microsoft documents a separate detail for Exchange 2019 and Subscription Edition backups made with MetaCacheDatabase enabled. The restored EDB can retain its association with the old cache database. Use Microsoft's MCDB restore procedure for that specific mount error before treating a clean database as corrupt. Recovery database and replay instructions and MCDB restore guidance.
Can you recover an Exchange database without log files?
An offline EDB already in Clean Shutdown has no outstanding transactions to replay. It may be usable as a recovery database without the old log stream. Compare the restored mailbox date with the date of the message you need.
If Exchange runs in a VM and the database was rolled back while the log volume stayed current, the two sets of files may describe different moments. Keep those sets intact. Look for an application-consistent backup that contains the database and associated logs from the same restore point. If a database availability group has a usable copy, assess its state and date before choosing a source. In a hybrid deployment, establish whether the missing mailbox was still on premises or had already moved to Exchange Online. A local EDB contains what lived in that database at that time.
| Operation | What it does to the working copy |
|---|---|
eseutil /r soft recovery | Replays the matching log sequence and writes the resulting changes into the database. |
eseutil /p hard repair | Removes damaged structures to leave a database that may be readable. Mail and attachments referenced by removed pages can be lost. |
eseutil /d offline defragmentation | Rewrites the database into a compacted file. It supplies neither a missing log nor the contents of a lost page. |
Hard repair belongs on an expendable copy after backup, replica and log options have been exhausted. Keep any pre-repair copy even if someone has already run the command. Microsoft treats a hard-repaired database as a source from which to move mailboxes into a fresh database. A successful mount after repair is a chance to extract and check the mail. Exchange Team policy for repaired databases.
Restoring the mailbox and checking the result
An Exchange recovery database (RDB) keeps the restored EDB separate from the live database. Use the restored paths and your recovery server name in these examples.
- Create the RDB with
New-MailboxDatabase -Recovery -Name RDB1 -Server EX01 -EdbFilePath E:\RDB\Database\Mailbox.edb -LogFolderPath E:\RDB\Logs. - Arrange a maintenance window if users have mailboxes on that server. Restarting the Information Store interrupts their access. Run
Restart-Service MSExchangeIS, thenMount-Database RDB1. - Run
Get-MailboxStatistics -Database RDB1 | Format-Table DisplayName,MailboxGUID. Match the source GUID to the intended mailbox and check its target alias in the same forest before writing anything. - To restore into a separate folder in the same user’s mailbox, substitute its GUID and alias in
New-MailboxRestoreRequest -SourceDatabase RDB1 -SourceStoreMailbox <source-GUID> -TargetMailbox <target-alias> -TargetRootFolder RecoveredMail. Once the request completes, open RecoveredMail and check a known attachment and the dates you need.
Microsoft's RDB capabilities and limits and mailbox restore request options.
In an Exchange Server disaster recovery, bringing back the server and bringing back its mailboxes are separate jobs. For a lost standalone server, Setup.exe /Mode:RecoverServer uses configuration held in Active Directory to rebuild the server. That configuration does not contain the messages. You still need the EDB and logs or a suitable backup. Microsoft's lost-server recovery procedure.
Version and storage differences that affect an EDB restore
| Exchange environment | What to keep or check |
|---|---|
| Exchange 2003 | Keep the matching .stm streaming database with the .edb. Older stores can have message content in both files. |
| Exchange 2007, 2010 or 2013 | Identify the exact release and use its recovery instructions and compatible tools. The later mailbox-store design no longer uses the separate STM. |
| Exchange 2016, 2019 or Subscription Edition | Microsoft's current RDB instructions cover these releases. Check the MCDB exception for 2019 and Subscription Edition if applicable. |
Subscription Edition was released in July 2025. If the original volume was BitLocker-encrypted, retain the volume's recovery key with the backup information. It may be needed to reach the EDB on the original volume before any Exchange tool can open it. Microsoft's Subscription Edition release and the Exchange Team's legacy EDB/STM guidance.
For an unreadable RAID volume, storage work comes before mailbox extraction. This work is quoted per case.
Get help with data recovery
Bring your device to our Lincroft lab during opening hours, or mail it in.
How to mail your deviceThe $100 diagnostic is non-refundable once diagnostics start, and donor drives or replacement parts you approve are non-refundable once ordered, even if recovery fails.
Published by MDrepairs
MDrepairs is a data recovery and electronics repair lab in Lincroft, New Jersey. Our founder and lead technician Joseph Montanti films real cases for our YouTube channel, showing tools, repair steps and recovery outcomes.
Keep reading
- Windows Storage Spaces Failure: Preserve the Pool Before Resetting Disks
- Synology Volume Crashed: What to Do While Files Are Still Readable
- RAID 1 Recovery: Why a Mirror Does Not Save Every Deleted File
