Once it comes to losing crucial Exchange Server data, the situation becomes very challenging. Database corruption is the most likely cause behind this situation. And the only possible way to restore your data is to repair Exchange database. Instead of using a paid solution, you should try the built-in tools of Microsoft Exchange Server, i.e. Eseutil and Isinteg. In this post, you’ll learn how to use them to repair Exchange database.
In 1993, Microsoft has developed an email-based collaborative communication and messaging server, known as Microsoft Exchange Server, for business and organizations. An Exchange Server is basically a mail server, contact manager as well as calendaring software. Microsoft Outlook contains various outstanding features and some of them can only be used with Exchange Server.
In Microsoft Exchange Server, you can easily add multiple users to establish a connection or communicative network among them. Exchange Server becomes a medium to exchange data and information in large businesses and organizations. The advanced security features of Exchange Server are the main reasons behind its popularity among users. The primary function of Exchange Security is to provide protection against virus attacks in incoming/outgoing emails. It also helps users avoid receiving unwanted spam messages. Also, it restricts hackers who can hack your email accounts in order to access all the data and information in them.
Being a mail server, Exchange Server has its own mailbox which contains a lot of data and information. It creates an Exchange database, called EDB, to store all the mailbox data of an Exchange Server. An EDB file of Exchange Server stores in-process as well as non-SMTP messages. And each EDB file has a corresponding STM file which contains all the original SMTP messages.
Exchange users might also be interested in Convert EDB to PST Format by using ExMerge.exe Utility
Corruption in Exchange Server
Unluckily, an EDB file is not immune to corruption. Although the latest version of Microsoft Exchange Server 2010 is more secure than its previous versions, however, corruption can take place in Exchange database files. Having a corrupt Exchange database file is the most frustrating situation for both Exchange administrators and users. It’s quite challenging to fix this corruption or repair Exchange database files. You’re lucky enough if you’re having a valid and updated backup. You can easily restore the copies of your data from the backup file. But what would happen if there’s backup file? As the fact says that no computer file is immune to corruption, so as the backup file. There are various reasons which can cause corruption in BKF file. Having no backup and a corrupt backup file is all same because you can’t restore your lost data back in both the situations.
How to Repair Exchange Database?
If there’s no backup or if it’s corrupt, you can try to repair Exchange database with the help of Eseutil and Isinteg utilities, built-in tools in MS Exchange Server. Before using these tools, you need to perform some operations, such as
- Replica creation of the database;
- Dismounting the EDB file from the Exchange Server; and
- Finally, confirmation of disk space.
Refer to this blog post for complete information Actions before using Eseutil and Isinteg tools
Part #1 – Repair Exchange Database
The Eseutil and Isinteg tools are very helpful to repair Exchange database files. They come built-in utilities in Microsoft Exchange Server and perform database recovery from the Exchange Server. The default location of these tools is:
There are two repair switches in Eseutil: “/r” and “/p”. To fix minor corruption from Exchange database files, you can try command Eseutil/r. And to repair badly damaged database files, you can try command Eseutil/p. Before running the commands, put both database files (EDB and STM) in the same directory. If you store them in different locations, you need to point to the files on the command line. Installing Microsoft Exchange on a server will create a directory, called (ExchSrvrBin). The directory contains Eseutil utility. The complete Eseutil repair command line is shown below:
Eseutil /P c:exchsrvrmdbdataDB1.EDB /Sd:exchsrvrmdbdataDB1.STM /Te:TEMPREPAIR.EDB
Part #2 – Repair Exchange Database
The above command line will repair Exchange database file DB1.EDB placed in C: drive along with its matching STM file (placed in D: drive). This will also place the temporary file on E: drive. Sometimes you may face a problem in which the STM (streaming database file) doesn’t match to the EDB file or there’s an issue that actually blocks the repair process. In such situation, you can repair it without adding the /createstm switch to the repair command line. This will only repair EDB file and remove STM file. The repair action may take some hours. Once it gets completed, you will get a comprehensive log file, named Database.integ.raw.
Defragment Exchange Database
Finally, it’s the time to defragment Exchange database. After successful repairing Exchange database, you’ll have index and space distribution tables in the database. Defragmentation will recreate the space trees and indexes in the database as well as it will compress the size of the file. To defragment the database, you need a space more than the actual size of the database. Now perform the Integrity Check by running Isinteg.exe in -fix -test alltests mode. Before running it, make sure the database is located at the same location from which it’s normally mounted.