Microsoft Exchange Server is an e-mail server used to store not only emails but also contacts, calendars, attachments, etc. It is one of the crucial parts of any organization as it is used as data storage or as a data distributor. It stores the copy or the backup of each Outlook account or mailboxes. However, you also need to take care of the Exchange and its EDB file as it also suffers from various issues like Dirty shutdown and it is required to repair Exchange database from dirty shutdown state.
The dirty shutdown means a closing of something that is not clean or inappropriate. If the case of the Exchange server, you can say an improper way of shutting down the Exchange Server.
The question here is why actually this happens.
The term Dirty shutdown actually is a state of the Exchange Server, which says that the log file is not committed to its database and you may lose the database or the log file.
As we, all are very much aware that a log file is very important for any organization to provide deep information about the entire process. A file that records each event or communication of the organization.
It is very important that each log file should disconnect or detach from its database. If not, then it suffers a dirty shutdown. When Exchange goes into this state or the condition then the Exchange dismount and turns into an unexpected shutdown.
When a log file dismounts to its database completely then only it is said to be clean shutdown.
When you come across this issue, you may get various errors confirming that it is a dirty shutdown. Below are some of the errors that you usually find when Exchange goes to this condition.
Operation terminated with error -550 JET_errDatabaseDirtyShutdown, Database was not shutdown cleanly. Recovery must first be run to properly complete database operations for the previous shutdown
The database was not shutdown cleanly (dirty shutdown)
Exchange is unable to mount the database that you specified: 0f770558-4961-4a57-9008-2549f8f 19116;Error Code:MapiExceptionCallfailed:Unable to mount database. (hr=0x80004005,ec=-528)
Exchange is unable to mount the database that you specified
Now, what to do for rectifying these errors and how you can convert the Exchange state from dirty shutdown to clean shutdown.
Before starting with the fixing solution here are the few points you need to take care.
In addition, I would like to make you aware of the Eseutil and Isinteg are an in-built tool provided by Microsoft to provide the solution to fix the Exchange DB fix dirty shutdown.
Here, I will talk about the dirty shutdown in Exchange 2016, 2013, 2010, 2007 and all other older versions.
In the very first step, you need to check that the database is in a dirty shutdown state or not. To check the same runs the given below command.
eseutil /mh “path of priv.edb”
eseutil/mh “C:\ program files\ exchsrvr\ mdbdata\ priv1.edb”
If you want to check the same for the public folder then it is required to execute the below command.
eseutil/mh “C:\ program files\ exchsrvr\ mdbdata\ pub1.edb”
Here, eseutil/mh used to check the state or the consistency of the Exchange.
After running the above command, if the Exchange DB found in the dirty shutdown state then it required to repair it using the below command.
eseutil/r “C:\ program files\ exchsrvr\ mdbdata\ priv1.edb“
This will repairs Exchange from shutdown problem state to clean.
Again, check the consistency of the database. If it does not work, try hard repair if it found inconsistent to recover Exchange database from the dirty shutdown.
eseutil/p “C:\ program files\ exchsrvr\ mdbdata\ priv1.edb“
Note: eseutil/p, a command that may lose your data. Microsoft does not suggest this command as it not always good to run the hard repair.
After the hard repair, defrag the database with the following command.
eseutil/d “C:\ program files\ exchsrvr\ mdbdata\ priv1.edb“
Again, check the consistency of the database of Exchange.
Note: It may happen that you still get a dirty shutdown state with an error of database attachment. You need to run the below command for this.
eseutil /r "C:\ program files\ exchsrvr\ " /d "C:\ program files\ exchsrvr\ mdbdata\ priv1.edb"/i
“/I” used to skip the exchange dirty shutdown missing log file. It mainly needs to run these commands in old versions of Microsoft Exchange. It is when there is a need to recover single data from multiple databases. “/d” is the parameter used with a qualified path to EDB where you require providing only the directory path in spite of the complete path.
There is one more software to remove dirty shutdown exchange database is using isinteg command. The below command helps you in dirty (unexpected) shutdown recovery.
“isinteg –s servername –fix –test alltests“
As dirty shutdown is not good for the Exchange Server, it needs to repair as it leads to the corruption of the EDB file.
If you want to know, other several cause and prevention of EDB file corruption then visit: https://www.mailsdaddy.com/blogs/causes-exchange-database-edb-corruption-prevention/
There is one option where you do not require executing a single command. Running of command leads to several different kinds of errors or data loss if you do not do it properly and you need to be a technical expert. In addition, the Eeseutil tool does not always give quality results in all situations. Therefore, it always recommended following the method that is trustworthy to fix corrupt EDB and that is through third-party software.
Final verdict: In this blog, I tried to explain about the Dirty Shutdown and discussed how to repair Exchange Database EDB from Dirty Shutdown State.