Fix "Database is in a dirty shutdown state" in Exchange Server
An Exchange mailbox database will not mount if it was not shut down cleanly. This guide shows you how to confirm the database state, replay the transaction logs and mount the database again.
Before you begin
- Open the Exchange Management Shell as an administrator.
- Make sure all log files for the database are in the log folder.
- Copy the database file and log files to a safe location.
Steps
-
Check the database state. Run the following command. Replace the path with the location of your database file.
eseutil /mh "D:\Databases\DB01\DB01.edb"In the output, find the
Stateline. If it showsDirty Shutdown, continue to the next step. -
Replay the log files. This is called soft recovery. Replace
E00with the log prefix used by your database.eseutil /r E00 /l "D:\Databases\DB01" /d "D:\Databases\DB01" -
Confirm the new state. Run the command from step 1 again. The state should now be
Clean Shutdown. -
Mount the database.
Mount-Database -Identity DB01
Do not run a hard repair yet. If soft recovery fails because a log file is missing, do not use eseutil /p as a first response. It can permanently remove data. Restore from a backup or use a database recovery tool first.