Kernel Data Recovery Blog

How to repair a corrupt Exchange database?

Read time 8 minutes

Summary: A corrupt or unhealthy Exchange database can lead to data inaccessibility. Exchange administrators need to be proactive and prepare recovery and repair strategies beforehand to avoid such situations with minimum downtime. This article guides you through the easy process explaining how you can efficiently repair corrupt EDB file and restore your Exchange Server with Eseutil (Microsoft’s utility) and Kernel for Exchange Server Recovery tool.

Microsoft Exchange Server has revolutionized professional email communication for businesses, making it more convenient and efficient both internally and externally, regardless of the company’s size. Microsoft has introduced several features in Exchange since it was first introduced in April 1996 to make the messages completely secure. But still, many threats are roaming around to damage the database. These threats hold the potential to make the Exchange database corrupt and inaccessible.

This Exchange database shows obstructions in mounting until you completely fix the corruption and repair corrupt EDB file. Let’s go through this article and learn about EDB corruption in detail and how we can resolve it from the server.

Why do you need to repair Exchange database?

Repairing Exchange database corruption is crucial to make the email communication and data accessible to all users. Here is why it’s essential to repair EDB file:

Types of Exchange database corruption

Majorly, there are two types of EDB corruption in an Exchange server. Before we discuss these methods of Exchange EDB repair in detail, it’s crucial to understand these two types. So, without a further ado, let’s start:

Security features of Exchange Server 2019

The latest version of Exchange Server has upgraded the security features to safeguard the user mailboxes. Here are some prominent features:

How to check corruption in Exchange mailbox?

In the Exchange Server 2003, 2007, 2010, 2013, 2016, and 2019, run the following steps to check for corruption in your Exchange database and mailboxes.

  1. Open Eseutil.exe
  2. Run the eseutil /mh command to identify if the database is in Dirty Shutdown or Clean Shutdown state.

If the result shows you a Clean Shutdown state, your database is free from errors or corruption. However, if you find a Dirty shutdown state, there is corruption and inconsistency in your EDB files, and recovery is crucial.

Run the given PowerShell command using Exchange Management Shell to find if there’s corruption in the mailbox of Exchange 2013, 2016, and 2019.

New-MailboxRepairRequest

The command will help you find either out of the four corruption types: AggregateCounts, FolderView, ProvisionedFolder, and SearchFolder.

Eseutil helps in repairing the database only if the mailbox database is dismounted. However, the given PowerShell cmdlet helps repair corrupt Exchange database individual and multiple mailboxes without dismounting the online database.

How to repair corrupt Exchange database files?

Let’s discuss how to recover the lost data from a corrupt Exchange database and convert EDB file to PST.

Using Eseutil utility to repair EDB files

Eseutil is an inbuilt tool that serves various essential functions such as repairing corrupted Exchange databases, defragmenting them, verifying database integrity, and optimizing storage by reducing database size.

  1. Locate the Exchange Database
  2. The default location of the tool in Exchange 2013/2016 is:

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

    The Eseutil tool offers extensive functionality, allowing you to perform various actions using a range of switches:

    • To repair the database: eseutil /p
    • To defragment the database: eseutil /d
    • To restore the database: eseutil /r
    • To verify checksum in the database: eseutil /k
    • To check the database integrity: eseutil /g
    • To do hard recovery: eseutil /c
    • To display the headers, logs, or checkpoint files: eseutil /m
    • To copy database and log files: eseutil /y
  3. First, dismount the database from Exchange.

    Dismount-Database –Identity <name of the database>

  4. Run Eseutil /d command

    eseutil /d <name of the database> /T <location of temporary path>

  5. After successfully running the Eseutil command, mount the database back to Exchange.

    Mount-Database –Identity <name of the database>

  6. Repair the database with Eseutil /p command.

    eseutil /p <location of the database>

  7. Finally, run the new-mailbox repair request command to fix the errors in the database.
  8. New-MailboxRepairRequest -Database <name of the database> -CorruptionType <type of corruption>

You can execute this command multiple times to eliminate all issues in the Exchange database.

Limitations of manual method of recovery

Users who are new to the Microsoft Exchange Server environment might not have technical knowledge and expertise to understand how to operate the utility. To avoid the complexity, users can proceed with the automated method of Exchange database repair, which doesn’t require you to dismount the database providing a hassle-free manner of doing it.

Conclusion

When there is a corruption in the Exchange database, administrators have two primary options for recovery: Microsoft’s Eseutil and Exchange server recovery software. While using ESEUTIL is helpful in performing soft and hard recovery, it may alter data integrity. In contrast, Kernel for EDB to PST Converter maintains data integrity and streamlines the Exchange EDB repair and recovery, making it a more efficient solution, particularly for complex or severely damaged databases. The software is also vital for restoring email flow, ensuring productivity, and preventing data loss in Exchange environments.