MS Exchange Dirty Shutdown: Explained and Troubleshooting

I’ve been using Microsoft Exchange 2003 and playing with it for almost 4 years and during these 4 years, I have encounter many kind of issues involving this product. And the father of all this “issues” is exchange database “Dirty Shutdown”. This is by far the worst and most common issues that I’ve heard or experience.

So what is exchange “Dirty Shutdown”?

As the name suggest, “Dirty Shutdown” is when the MS Exchange shutdown dirtily, whatever that means. All jokes aside, it’s actually really bad even disastrous. A “Dirty Shutdown” happens whenever the Information Stores have not been closed in a properly manner. This might be due to power outage or power surges or any other action that might caused the server to be inproperly shutdown.

Most people usually think of dirty shutdown as the indication of damaged database. But that’s not the case at all. It’s just that Exchange database has not been shut normally and therefore it becomes our area of concern as it leads to corruptions in Exchange database .EDB and .STM files.

From TechNet

A Dirty Shutdown state does not indicate the database is corrupted or damaged. A Dirty Shutdown state indicates only that the database files were not detached from the log stream correctly. Therefore, before you can start the database again, you must first recover the database files.

The next time that the database is mounted, this recovery is run automatically. If automatic recovery fails, you can use the Microsoft Exchange Server Disaster Recovery Analyzer Tool to analyze the reasons for failure. After analysis, the Exchange Server Disaster Recovery Analyzer will provide recommendations for manually recovering the database files.

So how to check for Dirty Shutdown?

Login to you Exchange Server that you want to run the check and follow these steps.

  1. Click Start, and then click Run.
  2. In the Open box, type CMD, and then click OK.
  3. Switch to the C:\Program Files\ExchSrvr\Bin folder, type one of the following commands (as appropriate to your situation), and then press ENTER:
  4. type in eseutil /mh <My_Database_Name.edb>
    eseutil /mh "c:\program files\exchsrvr\mdbdata\priv1.edb"

    dirtyshutdown
    Find State: when you have “Dirty Shutdown”  it will say “State:Dirty Shutdown”.

So what to do next if you receive a dirty shutdown?

In most cases, when a dirty shutdown happen, the MS Exchange itself have a component that will try to soft-recover itself back to a clean-state.  You know, when a Mailbox Store is not mounted or couldn’t mounted, it most probably dirty shutdown.

If a database is inconsistent or is in a “dirty shutdown” state, Microsoft recommends that you perform a recovery operation to make sure that the database operations are completed correctly.

eseutil /r "c:\program files\exchsrvr\mdbdata\priv1.edb"
  1. Ran the eseutil /p from the BIN folder and repaired both the priv1.edb and pub1.edb files.
  2. Deleted the log and chk files.
  3. Ran a defrag on the stores . eseutil /d
  4. Ran isinteg (isinteg -s servername -fix -test alltests) frorm the bin folder.
  5. Mounted the stores.

7 comments

  1. Luis Bob

    Before running hard repair, please go through this Microsoft’s KB article : Ramification of hard repair : http://support.microsoft.com/kb/259851

    Actually, when we run hard repair command tool, it removes corrupt database pages from database file. It means sometimes users have to face data lose problems. However, this data lose situation can be avoided by using a third party Exchange recovery tool like Stellar Phoenix Exchange server recovery software : http://exchange.stellarservertools.com/

    Bob

  2. lokman

    Hey,

    Great input! I never knew there is a tool to assist us on this but does it really work on Exchange 2003? If I remember correctly, when a corrupt item detected in Exchange 2003 DB during the repair work, it will remove the item from the DB and restructure its table hierarchy (something like that).

  3. Eric Bella

    Hi Lokman,

    Thanks for detail information about exchange dirty shutdown error . It is really very bad situation faced by the Exchange server administrators. It is true that eseutil /p repair method remove the corrupt or unrecognized items from database (.edb) file to bring the database into consistent state. However, there are some third party tools which rebuild the corrupt items and make the database consistent. Thus, users should take backup on regular basis to prevent data loss situations and also to handle the disaster situations efficiently. In the absence of valid database backup, it is good to use a third party tool like this: http://www.serversdatarecovery.com/exchange.html

    This tool has been designed with strong scanning modes to handle the corruption and to prevent data loss issues. This software rebuilds the damaged items and enables the users to directly mount the database to MS Exchange Server.

    Thanks
    Eric

  4. Curtis

    There are many inbuilt applications available on Exchange sever for recovery of corrupted mail box but this process is bit difficult for a lay man as it requires technical expert. Because all the process depends on command lines. To overcome such issue many companies developed a software for repairing, recovering and conversion of your exchange server database. One such utility is here with user friendly interface thus you can operate it easily without any technical support.
    http://www.undeletepcfiles.com/exchange-edb-recovery-tool.html
    Free Version also available

  5. rachelbel

    Eseutil utility does not work when data is highly corrupted or in Dirty Shutdown state. I was working with Exchange 2003 and experience the same problem. When I ran eseutil/r this command did not work. Then I tried eseutil/kPriv1.edb it tells me that data base is in dirty shutdown state and highly corrupted.

    As a solution I used EDB converter application that simply remove corruption from the EDB file and convert it into PST file format.

    Get More Detail: http://www.pcvita.com/edb-converter.html

Leave a Reply