Eseutil commands fall into two groups. Seven switches check files and change nothing, while /r, /c, /p and /d change your database.
Use /mh first to see the database state. Copy the database with its logs before a switch changes it. Dismount the database first.
Eseutil commands look alike, yet four of them change your database file. You get syntax for 12 switches below, with a flag on the ones that alter data.
Start eseutil commands with /mh. Output names the database state. Your next switch depends on that answer.
What is Eseutil and Where do You Find It?
Eseutil is the Exchange Server Database Utilities tool. Eseutil commands work on .edb database files, E00 transaction logs and the .chk checkpoint file.
Microsoft describes Eseutil as a command line tool that can verify, modify and repair an Exchange database file, per Disaster Recovery Tools and Wizards. Microsoft lists the same eight modes (/d, /p, /c, /r, /g, /m, /k and /y) for Exchange 2003 and 2007 in Exchange Server Database Utility Guide and Eseutil.
| Release | Default folder for eseutil.exe |
|---|---|
| Exchange 2000 and 2003 | C:\Program Files\Exchsrvr\Bin |
| Exchange 2007 | System drive\Program Files\Microsoft\Exchange Server\Bin |
| Windows (esentutl.exe) | Built into Windows |
Folders in the table come from Exchange Server Database Utility Guide and Eseutil. Log on with a local Administrators account, as How to Run Eseutil /K (Checksum) requires. Dismount mailbox databases before you use /m, /k, /d or /p.
Which Eseutil Switch do You Need?
Eseutil switches split into 7 that check files and 5 that create or change them. Find your goal in the table, then jump to the eseutil syntax for it.
| Switch | What it does | Changes the file | Full guide |
|---|---|---|---|
| /mh | Displays database header | No | Exchange Database Dirty Shutdown |
| /ml | Validates log files and their sequence | No | Covered below |
| /mk | Displays checkpoint file header | No | Covered below |
| /mm | Dumps database metadata | No | Covered below |
| /ms | Dumps space use per table | No | Exchange EDB File Too Big |
| /k | Verifies checksums on pages | No | Exchange Jet Error -1018 |
| /g | Verifies page and ESE level integrity | No, scratch database only | Covered below |
| /r | Replays logs into database | Yes, applies logged changes | Exchange Database Dirty Shutdown |
| /c | Controls hard recovery after legacy backup restore | Yes, replays logs | Covered below |
| /p | Repairs database by discarding pages | Yes, deletes data | Before You Run Eseutil /p |
| /d | Defragments and compacts offline | Yes, replaces original by default | Exchange EDB File Too Big |
| /y | Copies large files in big blocks | New copy only | Covered below |
Switch m takes a modifier letter. Microsoft lists h for headers, k for checkpoints, l for logs, m for metadata and s for space use in How to Run Eseutil /M (File Dump).
What do Check Only Eseutil Switches Show?
Seven eseutil commands check files and change none of them. Microsoft states that the /m modes only report on file state and make no repairs, per Eseutil /M File Dump Mode.
/mh displays the database header. State shows Clean Shutdown or Dirty Shutdown. Log Required lists the logs the file still needs.
After a /p repair the header adds Repair Date and Repair Count.
eseutil /mh "D:\DB01\DB01.edb"
/ml validates the integrity and sequence of log files. Microsoft says it confirms that logs form a matched set and that none is damaged. Compare log numbers with Log Required from /mh to find gaps.
cd /d D:\DB01\Logs
eseutil /ml E00
/mk displays the header of the checkpoint file. Exchange uses that file to find the log where replay begins, per Eseutil /R Recovery Mode.
eseutil /mk "D:\DB01\Logs\E00.chk"
/mm dumps database metadata, the catalog of tables inside the .edb. /ms dumps table space use. Microsoft says the last line totals the free pages, so multiply that total by the page size to estimate the space a defrag returns.
eseutil /ms "D:\DB01\DB01.edb"
/k detects header damage in the database, log files and checkpoint files, per Eseutil /K Checksum Mode.
eseutil /k "D:\DB01\DB01.edb"
/g verifies page level and ESE level integrity, per Eseutil /G Integrity Mode. Microsoft says the check makes no changes to the database and builds a temporary scratch database, so keep free space equal to 20 percent of the files.
eseutil /g "D:\DB01\DB01.edb"
Microsoft says to bring the database to Clean Shutdown before /g.
Which Eseutil Commands Change the Database?
Four eseutil commands change your database file, namely /r, /c, /p and /d. Switch /y copies a file and leaves the source unchanged.
/r replays transaction logs into a database. Microsoft calls this soft recovery when logs replay into an offline copy or after an unexpected stop, per Eseutil /R Recovery Mode.
Soft recovery depends on files staying put. Microsoft says moved, deleted or destroyed database and log files break that assumption. Open the command prompt in your log folder before /r, because a folder without logs creates a new log file that carries no database path.
eseutil /r E00 /l"D:\DB01\Logs" /d"D:\DB01"
/c controls hard recovery after you restore a legacy streaming backup. Use /cc to start it. Hard recovery deletes the files in the Restore.env temporary folder once it succeeds, so never keep your only log copy there, per Eseutil /C Restore Mode.
eseutil /cc
Among eseutil commands, /p repairs a corrupt offline database by discarding pages it cannot fix. Microsoft says repair can discard rows or entire tables and results in some data loss, so back up first, per Eseutil /P Repair Mode.
Repair invalidates previous backups, per How to Run Eseutil /P (Repair). Microsoft's Exchange 2007 guidance says to follow /p with /d and Isinteg and to keep the database out of long term production.
eseutil /p "D:\DB01\DB01.edb"
/d defragments and compacts a database offline. Microsoft says the original file is deleted by default once the temporary database becomes the new production file, per Eseutil /D Defragmentation Mode.
Keep free disk space equal to 110 percent of the end size, per How to Run Eseutil /D (Defragmentation). Users lose mailbox access during the defrag.
eseutil /d "D:\DB01\DB01.edb" /t "F:\Temp\defrag.edb"
/y copies large files in larger blocks. Microsoft says it can copy up to 20 percent faster than a normal copy and takes one file at a time, per Eseutil /Y Copy File Mode.
eseutil /y "D:\DB01\DB01.edb" /d"F:\Copy\DB01.edb"
In What Order Should You Use Eseutil Commands?
Use eseutil commands in this order, from checks that change nothing to switches that alter files.
Step 5 is where Exchange EDB Converter from Univik fits. Your copied .edb opens offline on a Windows PC. No Exchange Server or Outlook is needed.
Add your log folder and Univik Software replays those E00 logs into a temporary copy, the way eseutil /r does. Your source file stays unmodified. Export steps for PST output sit in How to Convert EDB to PST.

“Run /mh first and read the whole header. Half the eseutil jobs we see would end right there if someone looked at Log Required.”
What do Common Eseutil Errors Mean?
Eseutil commands report failures as ESE numbers. Numbers map to causes like missing logs or a locked file. Names and values come from Extensible Storage Engine Error Codes.
| Error | ESE name | What it means | Where to go |
|---|---|---|---|
| -528 | JET_errMissingLogFile | Current log file is missing | Exchange Database Dirty Shutdown |
| -543 | JET_errRequiredLogFilesMissing | Log files needed for recovery are missing | Same guide as -528 |
| -1216 | JET_errAttachedDatabaseMismatch | Database is missing or does not match attachment info | Exchange Database Won't Mount |
| -1018 | JET_errReadVerifyFailure | Checksum error on a database page | Exchange Jet Error -1018 |
| -1811 | JET_errFileNotFound | File was not found | Exchange Jet Error -1811 |
| -1032 | JET_errFileAccessDenied | File is locked or in use | Pause backup and antivirus scans on the file |
| -1605 | JET_errKeyDuplicate | Illegal duplicate key | Eseutil Illegal Duplicate Key |
Check the file path and the log prefix in your eseutil commands first. Microsoft says /r started from a folder without logs creates a new log file with no database path.
- Eseutil commands begin with /mh, which names the database state.
- Seven eseutil switches check files without changes, namely /mh, /ml, /mk, /mm, /ms, /k and /g.
- /r replays logs and /c finishes hard recovery. /p discards bad pages and /d compacts the file.
- Dismount the database and work on a copy before an eseutil command changes it.
- Save the mailboxes before /p, because repair invalidates previous backups.
Univik Software shows the mailbox tree of your copied .edb before an eseutil command changes your file. Trial edition saves 10 messages per folder. Licences start at $99 for 2 PCs.
Free Download See all featuresQuestions About Eseutil Commands
Can you use eseutil commands on a mounted database?
No for /m, /k, /d and /p. Microsoft lists a dismounted database as a prerequisite for /p in How to Run Eseutil /P (Repair). Copy the database file with its log folder before you start.
What is the syntax of eseutil /r?
Eseutil syntax for /r starts with the log prefix, as in eseutil /r E00. Add /l with the log folder and /d with the database folder, per Eseutil /R Recovery Mode.
Which eseutil command brings a database back to Clean Shutdown?
Eseutil /r performs soft recovery with the Log Required range from /mh output. Hard recovery with /cc covers databases restored from legacy streaming backups, per Eseutil /C Restore Mode.
Does eseutil work on Exchange 2003 databases?
Yes. Exchange 2000 and 2003 install their own Eseutil in C:\Program Files\Exchsrvr\Bin with the same eight modes, per Exchange Server Database Utility Guide. Exchange 2007 Eseutil does not support streaming (.stm) files, per How to Run Eseutil /P (Repair).
How do eseutil and esentutl differ?
Eseutil comes with Exchange Server. Esentutl is a command line tool built into Windows. Microsoft lists seven modes in Esentutl (/d, /r, /g, /k, /p, /m and /y).
Can you open a dirty .edb without eseutil commands?
Yes. Univik Software opens a dismounted or dirty .edb offline in Windows 11 or 10. Neither Exchange Server nor Outlook has to be installed.