Exchange Database is in Dirty Shutdown State Error – Learn to Fix

In this article, we are going to discuss exchange database is in dirty shutdown state. We will also discuss the solution to recover exchange from dirty shutdown which would be applicable for Exchange 2016, 2013, 2010 & 2007. As you might know that Exchange Server database is completely based on JET engine where log files are responsible for maintaining the track of input as well as output operations in the database file. It utilizes the concept of database cache mailbox to decrease the count of input and output operation. When the operation is loaded the cache memory then, it is not committed the information storage, the JET engine marks it as DIRTY. Until all the pending transactions are committed to the database then, it is not measured as updated. Moreover, until the time all the dirty pages are there in the database that is considered as inconsistent. Until the transaction is completed, if the machine shuts down accidentally then, database stay attached to the log file because of which “Exchange Database is in Dirty Shutdown State” error is received on screen.
To start the Exchange Server to smoothly, it is important that its database should be in clean shutdown state. For this, it has to be confirmed that database is “detached” from the transaction log files. At the time when Exchange Server is started, this condition is checked out as well as the missing data in the database files after that it is committed automatically via available log files. If it is not committed properly then it will give different error messages as mentioned below:
Error 1:
Operation terminated with error-550 JET_errDatabaseDirtyShutdown, Database was not shutdown cleanly. Recovery should first be properly run to complete database operations for previous shutdown.
Error 2:
Exchange is unable to mount the database that you specified database: 0f770558-4961-4a57-9008-2549f8f19116; Error Code: MapiExceptionCallfailed: Unable to mount database. (hr = 0x80004005,ec=-528)
Error 3:
Database was not shutdown cleanly (dirty shutdown)

Technique to Recover from Dirty Shutdown Errors

There are two ways to repair exchange 2013 database dirty shutdown error occurrence as mentioned below to get the database into consistency mode.

Method 1: Using ESEUTIL commands to fix dirty shutdown

It includes further two ways to fix dirty shutdown exchange 2013 error in Exchange Server that has occurred due to dirty shutdown.

Soft Recovery

Firstly, users need to verify the state of database, for this they need to run a command eseutil /mh1
The output that comes u shows that the database is in dirty shutdown state as shown below: Dirty Shutdown State
Users can also check the output under log requirement that the database is missing in the transaction log. We can simply relay log files into the database to get the database in consistency. For this, we follow the eseutil /r /l /d with eseutil. Soft Recovery
Once the repair is completed then, run eseutil /mh command to verify database is in clean shut down. Clean Shutdown State
This will always work when users restore a database from Windows Server Backup. However, sometimes it does not work so it is required to perform hard repair.

Hard Repair

Hard repair can be performed by using eseutil /p command to recover from dirty shutdown state. It will help to check database for any damaged pages; if it finds any damage page then, it will delete them. To perform hard repair user must have twice as much free space as the size of the database before performing that is needed for the temporary database creation.
Note: While performing hard repair you may lose your data.
For performing hard repair, utilize the eseutil /p command, as shown:
Hard Repair

Method 2: Effortless Solution

There is a software namely Exchange Recovery that makes easy for users to repair exchange database from dirty shutdown state to clean state directly. The application is designed by keeping the entire user’s requirement in mind to resolve the error issue. The software is programmed in such a way that it repairs the data from dismount or offline EDB files.

Conclusion

In this article we had a discussion about ‘Exchange Database is in Dirty Shutdown State’. While working on Exchange facing an error is creates a problem for users. One such common error faced by users is dirty shutdown. In the above discussion, the two ways to resolve this error is discussed that makes easy for users to resolve an error issue by maintaining data integrity.