Ms Exchange Dirty Shutdown: Explained and Troubleshooting

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"

  1. 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.

Lokman Azli

Tech Consultant at Infinite Logix System PLT
With more than 14 years of experience in designing, managing and maintaining IT infrastructure. He is also cofounded Awantera.co a Webhosting company that provide cheapeast unlimited space, unmetered bandwidth hosting in Malaysia