Offer Offer

News We Recently Launched AD Migrator and AD Reporter.

How to Repair Corrupt Exchange Database Using Eseutil – Best Way

  author
Written By Ashwani Tiwari
Anuraag Singh
Approved By Anuraag Singh
Published On July 11th, 2024
Reading Time 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.

Why Does Your Exchange Database Need Repairing?

Hardware Failure – Your old hardware might not be able to bear the brunt of real-time email conversation as it used to. So as a result it pushes the Exchange database first into a bad state and then into a corrupted state which can only be fixed via a repair. Anything from faulty hard drive sectors, to an inferior cooling mechanism can be the root cause.

Server Failure – Another variation of Exchange DB failure is almost guaranteed if the network it uses gets disrupted, faces misconfiguration, or overloads due to an excess of requests. Raising yet another repair request for the admin.

Accidental Shutdowns – Whenever the system is shut down accidentally, the Exchange Information Store fails to update transaction logs completely, hence causing inconsistency in the database followed by the same old need for fixing the error.

Oversized Exchange Databases – Whenever an Exchange database exceeds the size limit beyond the limit mentioned in the registry, the Exchange database gets corrupted. In such cases, the Exchange database dismounts itself and creates further issues in working.

Boot Failure – Any kind of malware attack or some sort of failure in system services can result in Boot failure. This issue can also occur due to hardware malfunctioning or OS failure.

Human Errors – Last but not least, there are scenarios where the administrator is working on the Exchange Server and makes an unintentional mistake. In these cases, you cannot avoid Exchange database corruption and eventually end up with a damaged DB.

Steps to Fix Exchange Database Using Eseutil Utility

As we discussed in the above segment 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: Fix Via 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>

After the recovery process, your Exchange database will be usable again. However, you might lose some important items during the recovery process.

This is the major reason why most 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.

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 repairs every bit of damaged data and retrieves it into a healthy state. Once the users complete the recovery process, there is an option to import EDB files into Exchange Server directly.

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 complex nature of the problem and high data loss chances, it is not the best solution. The best solution is the automated solution by SysTools which makes the whole process quick and simple without any data loss. Moreover, you can only extract the mailbox from the edb file once the fixing is complete.

Frequently Asked Questions

How as an admin can I diagnose Exchange database corruption in an on-premise server?
There are quite a few hints that your Exchange server drops when it’s nearing a corruption stage. Here is a list of behavioral changes that an admin can keep an eye on:
The exchange server is slower than before in sending and receiving email messages.
Users complain about login delays and log out abruptly.
The exchange server takes a longer time to boot up.
The auto-dismounting errors increase in frequency.

Is there any difference in the symptoms of corruption between the Exchange versions?
The behavior of the Exchange server after a corruption event stays mostly the same. Moreover, the versions have little to no impact on how the repair happens. The underlying structure of Exchange has remained the same throughout its upgrade. However, an area where differences arise is if corruption occurs in a part of the server that was either absent in a previous version or removed from future variants.

What are the best ways to prevent Exchange database corruption from occurring in the future?
Regular monitoring is by far the best prevention tactic that administrators can employ for their organization.
If possible, create a specialized task force whose responsibilities include regular checks on the server.
Complete hardware changes on time and schedule regular health checkups during off hours.

Why do many people recommend having a secondary Exchange server?
For emergency purposes, keep a backup server in place. This is to resume essential conversations in case the main Exchange Server line faces a sudden breakdown. Moreover, administrators gain the additional advantage of being able to restore the data in the event of irreversible corruption. If cost is a concern then remember you losing critical data forever is way more costly than keeping a backup.

  author

By Ashwani Tiwari

Being a Chief Technical Analyst, I am aware of the technicalities faced by the user while working with multiple technologies. So, through my blogs and articles, I love to help all the users who face various challenges while dealing with technology.

Repair Exchange Database