How to Repair Corrupt Exchange Database Using Eseutil – Best Way

Ashwani Tiwari ~ Modified: September 14th, 2022 ~ Exchange Server ~ 8 Minutes Reading

Whenever your Exchange database gets corrupted, it goes into a Dirty shutdown state and dismounts from the server. You cannot mount the database again to the server until the corruption issues are resolved. Until then, not a single user will be able to access their mailboxes, causing considerable loss to the organization.

Thus, it becomes crucial for an Exchange administrator to repair Exchange database as quickly as possible. Now there are two ways using which a user can repair corrupt databases i.e. Eseutil utility or an automated solution.

Eseutil is a command-line utility provided by Microsoft that gets installed during Exchange Server installation. It helps the administrators to repair corrupt, inconsistent databases in Exchange Server. This utility also helps administrators to diagnose DB problems and maintain DB health.

However, there are a couple of shortcomings associated with this utility that raises the need to use a professional solution to repair Exchange databases. Thus, in the following write-up, we will discuss both solutions in detail so that you can decide which method is most suitable for you.

Steps to Repair Exchange Database Using Eseutil Utility

As we discussed in the above segment that Eseutil is an in-built utility that comes with Exchange Server. There are multiple functionalities that can be used by using various switches of Eseutil. You can use the following switches as discussed:

  • To repair corrupt Exchange database – Eseutil /p
  • Helps to restore the database by replaying transaction log files – Eseutil /r
  • Helps in defragmentation of the database – Eseutil /d
  • Perform checksum test to verify pages in the database – Eseutil /k
  • If you want to check the integrity of the database – Eseutil /g
  • For hard recovery in Exchange – Eseutil /c
  • To display headers, checkpoint files, or logs – Eseutil /m
  • Copy database & log files – Eseutil /y

Point to be Noted – It is advised to keep a backup copy of your Exchange database file.

Step 1: Locate Eseutil on Exchange Server

The first step while repairing Exchange databases includes locating the EseUtil.exe. You can find it in the Bin directory of Exchange installation.

Default Location of Eseutil in Exchange 2016, 2013:

C:\Program Files\Microsoft\Exchange Server\V15\Bin\

Eseutil location

The location of the utility will change depending on the Exchange Server version that you are running.

Step 2: Check Exchange Database Status

The next step involves checking the state of the corrupt DB. For this, first, open Exchange Management Shell as an administrator and change the directory path to the location of Eseutil using the following command:

cd C:\Program Files\Microsoft\Exchange Server\V15\Bin

Now, run the below command:

Eseutil.exe /mh <database file path>

Dirty Shutdown

The output of this command will display the database header. Check the State field in the list. If it shows a Dirty Shutdown state, then we need to repair the Exchange database. However, if it shows the state as Clean Shutdown, then the database is in a healthy state and can be mounted to the Server.

Step 3: Run Soft Recovery on Exchange Database

This recovery type only works when there is minimal corruption in the Exchange database. This command will replay the transaction log files and brings the database from a Dirty Shutdown to a Clean Shutdown state. Additionally, this command ensures that no data is lost throughout the process.

The command to repair Exchange databases is as follows:

Eseutil /r <database file path>

This entire process might take some time depending on the performance and size of the database.

Step 4: Verify Database Status Again

Now, it is time to check if the above process was successful to repair corrupted Exchange DB or not. The command for the same is as discussed below:

Eseutil.exe /mh <database file path>

If the state appears as a Clean shutdown, then you can mount the database. However, if it is still showing a Dirty Shutdown state, then you need to perform a hard recovery on the database.

Step 5: Perform Hard Recovery

When the soft recovery fails to repair the damaged Exchange database, then you need to perform hard recovery using the /p parameter. You must keep in mind that this procedure involves high chances of data loss as it deletes all the irrecoverable data from the database. Additionally, you will get a data loss warning before initiating the process.

The command for the same is as follows:

eseutil /p <path_to_the_database>

Post this recovery process, your Exchange database will be repaired successfully. However, you might lose some important items during the recovery process.

This is the major reason why most of the administrators don’t prefer running hard recovery to repair Exchange databases. To eliminate the data loss chances, they prefer going with an automated solution that ensures complete recovery that too without losing a single bit of data. One such utility for the users is discussed below.

A Perfect Solution to Repair Corrupt Exchange Databases

When it comes to one of the quickest and simplest ways to repair Exchange DB, then SysTools Exchange Recovery Software is the top pick of the Exchange experts. The ease with which users can perform a repair job on their database is unparalleled. The simple user interface and advanced recovery mode make the entire process quick and secure.

Download Now Purchase Now

Additionally, the users don’t have to worry about their crucial data as this utility ensures that all the corruption issues will be fixed without any data loss. Once the users are done with the recovery process, there is an option to import EDB files into Exchange Server directly.

You can watch the video to go through the working of the video:

Final Words

Repairing an Exchange database could be a complex procedure if you don’t go with the right solution. Although some users opt for eseutil utility to repair EDB files, due to the complicated process and high data loss chances, it is not considered the best solution. The best solution is the automated solution by SysTools which makes the whole process quick and simple without any data loss.

Repair Exchange Database