Exchange Server Database won’t Mount after Dirty Shutdown? Here’s How ESEUTIL can Help

Exchange admins sometimes face a situation where the database does not come online or fails to mount itself. There are a number of things that could cause this issue, but most of the time it’s due to the Dirty Shutdown state of the database. This means that there is a problem with the database and possibly data corruption. 

ESEUtil is the native tool that is available in Exchange Server that can help recover the state of the database to Healthy Shutdown. In this article, we will be discussing ESEUtil and see how to use it. We will also be exploring alternative solutions that might help when ESEUtil fails.

Reasons for the Dirty Shutdown Issue

There could be many things why this could happen. Below are the most common ones:

  • Lack of disk space
  • Sudden loss of power
  • Incompatible third-party software
  • Virus or malware attack
  • Human errors
  • Hardware or software faults
  • Unmaintained or misconfigured Exchange Server

All of the above can extensively damage the Exchange Server database or the supporting files, such as the transaction logs. Corruption can put the database in Dirty Shutdown state and the Exchange Server will not be able to mount it and bring it online. This means that the mailboxes or resources hosted on the affected database will not be accessed or modified.

What is ESEUtil?

The ESEUtil (Extensible Storage Engine Utility) is a native tool that comes with the Exchange Server. This is used to execute low-level maintenance, and repair and recovery operations on the Exchange Server databases (EDB). Apart from recovery, the tool can be used for integrity checks, cleanup of white spaces, header inspection, and defragmentation of the databases. ESEUtil can also be used when the database doesn’t mount due to Dirty Shutdown and there is no valid backup to roll back to.

For recovery, ESEUtil provides two options:

  • Soft Recovery: It is used as a first preference to try to fix minor issues or minor damage in the database.
  • Hard Recovery: It is used as a last resort as the process simply purges anything from the database which is deemed corrupted or not good. This means that there is data loss. Also, there is no guarantee that this solves the problem. In addition, Microsoft will not provide support if hard recovery has been executed. 

What should be done before proceeding with Recovery using ESEUtil?

Depending on the situation, you must act accordingly. Here are a few things that would be beneficial to do before proceeding with the recovery process.

  • Ensure that the latest backup has been successful and can be recovered. This is needed in case there is no other option. 
  • Backup the existing Exchange Server databases and the transaction logs to a temporary safe storage. During the recovery process, there could be instances that the database gets more damaged.
  • When using ESEUtil, the recovery process generates a temporary copy of the database to process and recover the data. Ensure there is enough storage space. Usually this is calculated between 120% and 140% of the actual size of the database. 

How to Perform Soft Recovery using ESEUtil?

Soft Recovery replays transaction logs to try to bring the database to Clean Shutdown state. The process involves the following:

  • Replaying of uncommitted transaction logs in the database so that all changes are committed to the database.
  • Synchronizing of the state of the database with the log files to try to resolve data inconsistency that might be caused by sudden shutdown of the database.

This process is non-destructive and doesn’t purge any data from the database. To run the soft recovery, all the transaction logs are required. If there are corrupted or missing transaction logs, the soft recovery may fail.

To run the soft recovery, first you need to run the below command to get the state of the database.

eseutil /mh "M:\Databases\DB1\mydatabase.edb"

Note: Provide the full path of the database, including the file name. 

This command will reveal the last transaction log, which will be in the format – E00, and the state of the database, which in this case is Dirty Shutdown.

Now, use the below command to run the soft recovery process against the database.

eseutil /r E00 /l “M:\Databases\DB1\logs” /d ” M:\Databases\DB1\”

The process may take time depending on the size of the database and performance of the server and storage. After the process is complete, you should again run the command with the mh parameter to check the status.

How to Perform Hard Recovery Process using ESEUtil?

Unlike soft recovery, hard recovery is a destructive one which is why it must only be used as a last resort. It can take considerably a large amount of time and data loss is guaranteed. The process will just purge any changes which were not committed to the database, along with anything which is deemed as corrupted. Also, it may render the database in a more damaged state which would be beyond recovery.

The command to run the hard recovery is as follows:

eseutil /p “M:\Databases\DB1\mydatabase.edb”

After you put the entire path to the database, you will be prompted with a warning message that data loss will happen.

This process takes a long time to process and creates a new database. There is no guarantee that this will work and Microsoft will not provide support if the database is found to be run with this recovery process.

Alternative Solution to Recover the Database

As we have seen above, there is a risk of data loss involved. There are alternatives that can help you recover data without any loss from the database, which is in Dirty Shutdown state. Exchange recovery software, such as Stellar Repair for Exchange, can overcome the challenges and complications of recovering data using ESEUtil. The tool can independently open EDB files and granularly export user mailboxes, user archives, shared mailboxes, disabled mailboxes, and public folders to PST and other file formats. It can also export directly to live Exchange Server databases and Microsoft 365 tenants with automatic mailbox matching, parallel exports to speed up recovery, and priority exports. This helps reduce the amount of time and resources to recover the data from the database in any state, of any size, and from any version of Exchange Server.

Conclusion

In this article, we have discussed the entire process to recover the database, which is in the dirty shutdown state, using ESEUtil. There is a risk of data loss when performing hard recovery operation. So, you would need to have the right Exchange recovery tools to recover the database in the least possible time and without data loss. Stellar Repair for Exchange is one such tool that can help recover all the mailboxes and other items from corrupted databases with complete integrity.

Leave a Comment