Every Exchange administrator has to deal with data that can’t be accessed. This could be caused by a number of things, such as a bug in the system, a virus attack, logical errors, problems with the program’s user interface, and so on. In this blog, we’ll talk about the most common reasons why EDB files get corrupted and how to repair corrupted EDB files.
A corrupted exchange database could affect your business in a big way. EseUtil is a tool that can help. Using EseUtil, administrators can fix corrupt Exchange databases and restore mailboxes in several unwanted situations like uncommitted logs, missing or deleted transaction logs, server crashes, sudden shutdowns, malware, etc. When Exchange backups are out of date, broken, or not available, EseUtil can help.
Steps to repair corrupted EDB files using EseUtil
Step 1: Find the file and logs for the Corrupt Database (EDB).
The Exchange database (EDB) file is created at the following location when the Exchange server is set up:
C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\
But administrators can put the database file in a different folder or on a different drive volume to improve performance or for other reasons. So, before you repair corrupted EDB files, you must first find them. You must also find the checkpoint file and the transaction logs (.log) (.chk).
Step 2: Check the database’s status.
With the EseUtil command, you can find out what’s going on with your database:
- Press “Windows + R” and then type “EXCHSRVRBIN.” Press “OK” or “Enter” to finish.
- Click on the address bar to copy the path to where EseUtil.exe is.
- Open the Exchange management shell (EMS), and then use the “cd” command to move to where EseUtil.exe is.
Now, type the following command into the PowerShell window: EseUtil.exe /mh
EseUtil.exe /mh C:\mbx01\mbx01.edb
The information about the database header will be shown on the command output. Take a look at “state.” If it says “dirty shutdown,” something is wrong with the database, and it needs to be fixed. If the state is “clean shutdown,” the database is healthy and can be mounted to the server without any problems.
Step 3: Make a copy of the database’s files.
Find the Exchange server database file and ensure it’s right. Then, make a copy of the EDB, transaction logs, and checkpoint files. You can save a copy of the database files in another folder, on a separate device, or on a different volume.
Step 4: Run Soft Recovery with EseUtil.
“Soft recovery” is the process of running EseUtil with the /r parameter. When EseUtil is run on a broken database, it tries to fix the database without losing any data by committing the transaction logs and fixing the database. But it works when the damage to the database isn’t too bad.
To do a soft recovery, use the following commands:
EseUtil /r <database file path>
EseUtil /r C:\mbx01\mbx01.edb
How long this takes depends on the database’s size, how fast the server is, and how much space it has.
Step 5: Check how the database is doing.
Run the following command to see if soft recovery worked and if the database is now in a “clean shutdown” state:
EseUtil /mh C:\mbx01\mbx01.edb
See what’s going on. If it still says “dirty shutdown,” you will have to make a “hard recovery” to get the Exchange database back.
Step 6: Make a hard recovery with EseUtil.
You should only use hard recovery if soft recovery has failed and you can’t use a backup to fix the problem. The /p parameter does hard recovery.
Words of Warning:
The EseUtil/p command deletes mailboxes and data that can’t be brought back. It does this by getting rid of anything it thinks is broken or can’t be read from the database. So, Hard Recovery can make you lose a lot of data, which you might find out about later.
When you run the EseUtil /p command, you see a warning about losing data, which you must agree to in order to move on.
Third-party Solution to Repair Corrupted EDB Files
Several vendors in the market provide automated solutions to repair corrupted EDB files.
Shoviv EDB to PST converter is a tool that several professionals and Microsoft MVPs recommend to repair inaccessible EDB files. The software is developed by keeping an eye on the user’s needs and is laced with many user-oriented features. Like you can add several corrupt EDB files and repair them in a single go. Also, there are features like filter, folder mapping, and email translation. Incremental export, and so on.
Now I am not going to review it for you; you can examine the tool using the free version. The free version is a restricted version of the premium variant and allows processing for the first 50 items per folder.
Bottom Line
EDB files are crucial for business continuity, but same as other file formats, they are also prone to corruption. Here I’ve described both approaches manual solution (EseUtil) and automated tool Shoviv EDB to PST converter to repair corrupted EDB files. Now it’s all up to you what you choose.