Eseutil Commands to Perform Soft & Hard Exchange Database Recovery

Eseutil utility is one Exchange tool that has been developed specifically to tackle any kind of data disastrous situation encountered while using Microsoft Exchange Server. This situation could be the result of improper shutdown which in turn makes the database dirty. Eseutil handles such situation by defragmentation of the database offline. It further checks for the integrity of the database and at last repairs the damaged or lost database. It can be used for both soft recovery and hard recovery. Besides it is advised to always keep backup of the data, so that when any data crisis occurs this data can be easily restored.

Eseutil tool can be easily located at \EXCHSRVR\BIN directory. For using Eseutil utility database should be dismounted from Exchange Server. One can run Eseutil from command prompt also. First of all it is recommended to check whether the given database is corrupted or there is any other kind of issues. To exactly view the database state use the command ESEUTIL /MH “database name”. The searched results of eseutil command will show whether the database is in healthy or dirty state. Once it is confirmed that the database is in dirty state use the utility command ESEUTIL /MS to defrag the database offline. Defragmentation means to reorganize the way data is stored on the disk so that data is stored in contiguous format. It is necessary to defrag when numerous mails may have been either added or deleted.

The next step is then to check the integrity of selected database by using command ESEUTIL /G. Type the following command: ESEUTIL /G C:\Program files\exchsrvr\mdbdata\database name.edb. The last step is to repair the corrupted or damaged database. For repairing one can use command: ESEUTIL /P c:\program files\exchsrvr\mdbdata\ database name.edb /Se:\exchsrvr\mdbdata\ database name.stm /Te:\tempdb.edb. In case there is no .STM file present one can create it with ESEUTIL/CREATESTM. However while using ESEUTIL/P switch there are chances of data loss hence back up of data is really very important.

A number of switches are also available which can also be used depending on the requirement as below

ESEUTIL/R: It performs the soft recovery and brings selected data into a consistent state.
ESEUTIL/Y: This switch efficiently copies large database files or mailboxes with high performance.
ESEUTIL/C: It is capable of performing hard recovery during an online backup.
ESEUTIL/K: This switch provides the user to check that whether the repair was successful or not. The output of successful repair is indicated by zero wrong page numbers and zero bad checksums.

If it fails to repair corrupt Exchange Database Server then you can use third party Exchange recovery software.