Home  Services   |   Hosting   |  Collocation   |  Application Hosting  |   Support  |  Helpful Links   |  Contact Us   |  Schedule Service Online

Today's News
Knowledge Base: Search Microsoft's vast knowledge base of problems and solutions.
Error Messages: Use Microsoft's errors message search to see just what that error message is really saying to you
Product Solution Center: find answers for Microsoft's products in their Product solution center.

Using ESEUTIL to recover and repair Exchange databases
with dirty shutdown state

There are plenty of guides on using eseutil but getting the parameters right always seems to be a case of trial an error, so here's a quick how to:

 1) Copy all the original database and log files to somewhere safe. Then also copy them into a working directory. Eseutil will modify the files in situ so if it goes wrong you don't want your original files modified.

 You need to have a copy of the database files (*.edb and *.stm) plus the transaction logs (Exx*.log where xx is a number relating to the information store). The location of the files is available from Exchange system manager, but you really should know where they all are anyway.

 I'm going to assume the temp directory for the database files is e:\temp\data and they're called exchdb.edb, exchdb.stm. If they reside in the 1st storage group, the transaction logs will be called E00.log (this is the most recent base file) and E00xxxx.log etc (these are the old logs). Lets assume these are copied to e:\temp\logs. You need to replace these with your own paths/filenames of course.

 2) Check the database state and expected log files with

 eseutil.exe /mh e:\temp\data\exchdb.edb

 The output will show a line State: which will be either clean or dirty shutdown. If it's clean, then you don't need this article :)

 It will also show which logs are required e.g. which hadn't yet been played into the database when the dirty shutdown occured. If you have any missing then you will have lost email. This generally only occurs if you lost a log drive and have replicated copies of the logs you can use.

 3) "Recover" the database. This replays missing transaction logs into the database file - run:

 eseutil.exe /r E00 /d"e:\temp\data\exchdb.edb"

You might receive an error that there is an outstanding database attachment. In this case use the /i switch in the command

eseutil.exe /r E00 /d"e:\temp\data\exchdb.edb" /i

 4) recheck the database state with the command in 2). If it still shows dirty shutdown you need to repair the database with:

 eseutil /p e:\temp\data\exchdb.edb

 5) Recheck the database once more and it should show clean shutdown. At this point you should defrag the database

 eseutil /d e:\temp\data\exchdb.edb

6) The file is now in a clean state and is ready to be put back into Exchange so copy it back to the original location on your Exchange server but don't yet mount the file. The last step before mounting the file is to get rid of any remaining errors using isinteg.exe. This tool requires the database to be in the original location on the original Exchange server. It needs to be run several times until it no longer reports any errors.

7) Once the database file has no more errors you can now remount it in Exchange.


©2012 DSM Electronics, Inc. All rights reserved.   Terms of Use  |  Privacy Statement  |  Hosting Policy  |  Billing Policy  |  Contact US