ESEUTIL is located in the \EXCHSRVR\BIN directory. This directory is not in the system path so you must open the tool in the BIN directory or enhance the system path with the \EXCHSRVR\BIN directory
Exchange 2003 defragments the Exchange database every night. But this is only an online defrag of the database. An online defrag doesn’t reduce the size of the information store. To reduce the size of the databases, you must use an offline defrag.
Under normal conditions you don't need an offline defrag, but when you add tons of new users due to a merger or aquisition or when you delete many objects from the store it can be necessary to do an offline defrag.
Full list of Eseutil switches for Windows Exchange:
- Eseutil /cc Performs a hard recovery after a database restore.
- Eseutil /mc To determine the space.
- Eseutil /d Performs an offline compaction/defragmentation of a database.
- Eseutil /g Verifies the integrity of a database.
- Eseutil /k Verifies the checksums of a database.
- Eseutil /m Generates formatted output of various database file types. e.g. /mh
- Eseutil /p Repairs a corrupted or damaged database.
- Eseutil /r Performs soft recovery to bring a single database into a consistent or clean shutdown state.
- Eseutil /y Copies a database, streaming file, or log file.
1. To determine the space availability (110% free space associated with the database to perform the defragmentation):
C:\Program Files\Exchsrvr\bin>eseutil.exe /ms "C:\Program files\Exchsrvr\MDBDATA\priv1.edb"
2. To Defragment the store for compaction of space:
C:\Program Files\Exchsrvr\bin>eseutil.exe /d "C:\Program files\Exchsrvr\MDBDATA\priv1.edb"
3. To check the integrity of database(this integrity check does not support the database recovery like ISINTEG Tool)
C:\Program Files\Exchsrvr\bin>eseutil.exe /g "C:\Program files\Exchsrvr\MDBDATA\priv1.edb"
Like wise eseutil /p - repair is used in congestion with the isinteg to repair the damaged store from the scratch.