Quick Answer: To repair public EDB file corruption, use the eseutil tool that comes pre-installed with Exchange. The tool allows you to replay the uncommitted logs and fix structural issues with the Exchange public folder database file. If the eseutil tool fails to fix Pub1.edb corruption, use a professional EDB recovery tool.
When the Exchange Server detects corruption in public EDB file, the server dismounts it automatically to prevent further spread of the damage. In this situation, the administrator or a standard user fails to access the data inside the public folder EDB file.
To restore the workflow, the Exchange administrator has to repair Exchange public folder database and mount the database file on the Exchange Server. The Exchange public EDB repair is possible using the eseutil command-line tool that Microsoft ships with every version of the Exchange Server.
In this guide, we will discuss how to fix public EDB file error and restore the data inside the Pub1.edb file. However, before that, let's discuss what the Pub1.edb file is, why it becomes corrupted, and what are the consequences of public EDB file corruption.
The Pub1.edb is the name of the database that stores the public folder data of the Exchange Server. This database file was used in older Exchange Server versions, like 2000 and 2003. In addition to the Pub1.edb file, Exchange Server 2000 and 2003 also use a Pub1.stm file, which is a streaming database file.
The public folder database file stores the shared data, including emails, calendar, contacts, notes, tasks, etc. The Pub1.edb files mainly store the internal Microsoft data coming from applications using MAPI, like Outlook or another Exchange Server.
The public folder database in Exchange Server can get damaged due to several reasons, ranging from human mistakes to hardware malfunctioning. The most common reasons for Pub1.edb file corruption are:
A few common issues that will be surfaced at the admin-level and user-level after public EDB file corruption:
| Issues At Admin-Level | Issues At User-Level |
|---|---|
| Database automatically dismounts from the Exchange Server and fails to mount. | Users will fail to access public folder data from Outlook and get errors like "cannot expand folder" |
| Exchange administrator cannot create the database backup until they repair public EDB file. | If using mail enabled public folder, any email sent to the public folder email address will bounce back with a non-delivery report. |
| The Windows Event Viewer application will display different errors like Jet Error –1018 or –1019 | Users will not be able to access shared meetings and events due to an inaccessible public folder calendar. |
When you need to repair EDB file corruption, there are two solutions you can rely on. First is using the free built-in native application called eseutil and second is recovering the data from the damaged EDB file using a professional Exchange database recovery tool. Let's discuss both of them.
The eseutil tool comes with every version of the Exchange Server, and it allows you to repair Exchange public folder database by replaying the uncommitted log files. Using the tool, you can fix issues like Exchange Dirty Shutdown state, database consistency issues, and more. The steps to fix public EDB file error using eseutil are:
Step 1: Check database state
Open command prompt and use the "cd" command to go to the location where the eseutil tool is present. You can find the eseutil inside the "Bin" folder where the Exchange Server is installed. Once the command prompt points to the right location, run the following command.
eseutil /mh "edb-file-complete-path"
The command will show you the current state of the public folder database file. It will be either "Clean Shutdown" or "Dirty Shutdown". Since Exchange is giving errors which points to EDB corruption, your database state will be “Dirty Shutdown,” and you will have to repair it.
Note: If the database state, for some reason, is "Clean Shutdown", do not run any operation on the EDB file. First, try to mount it to the server and if mounting fails, then proceed with EDB repair.
Step 2: Repair the EDB file
If your database is in a "Dirty Shutdown" state, you have to repair Exchange public folder database using either the soft repair (if you have the uncommitted log files) or the hard repair (if log files are missing or the soft repair did not work)
Soft repair
Here, we will replay the uncommitted transaction log files and try to fix public EDB file error using the following command:
eseutil /r <log prefix> /l "log-file-complete-path" /d "edb-file-complete-path"
Now, check the state of the database again and if it says “Clean Shutdown”, mount the database. But if the "Dirty Shutdown” state persists, use hard repair.
Hard repair
This repair command will scan the EDB file and remove any page that it finds corrupt, resulting in data loss. Therefore, create a copy of your EDB file before you run the command given below:
eseutil /p "edb-file-complete-path"
Step 3: Defragment the EDB file
When you use hard repair, the corrupt blocks of the EDB file are removed and replaced with empty whitespace. To mount the database again, we have to remove the whitespace and compact the EDB file. For that use this command:
eseutil /d "edb-file-complete-path"
Then, check the database state and mount the EDB back to the Exchange Server if it is in a healthy state. If you find missing emails or folders, when the database becomes active, use a backup file to restore the deleted mailbox from the database.
However, if you do not have a backup file, you have to extract the missing data from the corrupt EDB file copy you made earlier. For this purpose, use an EDB to PST converter tool and extract the emails, contacts, calendar, or folders into a PST file. Then import the PST into Exchange to get back the lost data.
The eseutil tool does not guarantee to repair public EDB files. If the public database folder is severely damaged, the eseutil will fail. In such a condition, the safest option to restore the database is to use a professional Exchange database recovery tool and save recoverable data.
The Kernel for Exchange Server tool supports corrupt EDB files from legacy Exchange Server versions. You can add multiple corrupt Pub1.edb files of any size to the tool. After that, you can view and save the recoverable data to a local PST file.
Moreover, if you have a secondary database on the Exchange Server, the EDB recovery tool can directly migrate the public folder data from EDB to Live Exchange. This way, you can restore the workflow in minimum time while avoiding long downtime.
Should you try the eseutil tool or save your data using Kernel for Exchange Server? It depends on the state of your EDB file and whether you are comfortable with minor data loss. Always try the native eseutil tool first to repari public EDB file, and if that does not work due to severe corruption, then move towards the professional database recovery tool.
Additionally, make sure to fix any underlying hardware or software issues to prevent another occurrence of public EDB file corruption. Finally, after completing the recovery process, create a complete Exchange backup.
Ans: Yes, eseutil can repair Exchange public folder database. It offers two repair modes, soft and hard repair. Soft repair works by replaying uncommitted logs and fixing minor structural issues. And the hard repair allows you to deal with errors that soft repair cannot fix. However, the hard repair will cause data loss, so only use it as a last resort.
Ans: If you have a backup file of the corrupt public EDB file, use it to recover the data. If no backup is available and database repair is not possible due to severe corruption, you may use a professional EDB recovery tool to recover the data from the public folder database file.