Home » Blog » Exchange Server » How to Reduce Exchange Mailbox Database Size?

How to Reduce Exchange Mailbox Database Size?

  author
Published By Ashwani Tiwari
Anuraag Singh
Approved By Anuraag Singh
Published On February 5th, 2021
Reading Time 5 Minutes Reading

An approach that can be taken to reduce Exchange mailbox database size is by defragmenting EDB files. There are situations when the size of EDB files is way more than the expected size. There comes the need to reduce the size of Exchange mailbox (EDB) so that these database files do not consume much space. These spaces cannot be removed by moving mailboxes to a new database.

Instant Solution: Large Exchange Database File in Exchange Server always leads to problem such as: corruption, unable to access the data, etc… To resolve this problem users can use the EDB Recovery Software which help users to export the large offline/dismounted EDB file to PST file format. This utility provides Split PST Option that breaks the large Exchange database file to multiple Outlook data file. It supports .edb file of any version of the Exchange Server i.e. 2019, 2016, 2013, 2010, 2007, 2003. Also, the utility provides an advanced feature (Quick & Advance scan) that recover Exchange database from corruption with no loss of data and resolves mailbox corruption Exchange 2010/2013/2016 in a hassle freeway.

Download Now Purchase Now

EseUtil to Shrink / Reduce Exchange Mailbox Database Size?

EseUtil.exe (command line utility of Extensible Storage Engine) can be used to shrink Exchange database. Defragmentation transforms the databases into contiguous storage and removes all the unused white spaces which in turn decrease Exchange database size.

Things to Remember

  • Before performing the defrag Exchange database process, the user should first dismount the database.
  • The drive should have enough storage space, as a new and temporary file would be created in this process along with the existing file.
  • Time taken to shrink Exchange database, depends entirely on the amount of free space available in the database file, lesser the free space; more is the time consumed to complete the offline defragmentation of the Exchange database.

Working of EseUtil.exe to Perform Exchange Database Defragmentation

Eseutil creates a new database which contains all the information as that of the original database. Old database is deleted or is saved to some other location and the newer version is renamed as the original. In case of an offline Exchange database defragmentation, Exchange server creates a temporary database in which it preserves all the tables by copying from the original database.

The empty pages are removed and the indexes are rebuilt and updated according to the new positions. All the page links are updated and all the pages left in the database are tested for integration. Here are the simplified steps to perform Offline defragmentation of the Exchange database by Eseutil.

  1. The first step is to dismount the mailbox database, for which you need to launch Exchange Management Shell and perform the following commands –C:\ Windows\ system32>cd D:\ Mailbox\ ‘dbname’
    D:\ Mailbox\ ‘db name’> Dismount-Database ‘db name’
  2. Now run Eseutil.exe for defragging the Exchange EDB file.D:\ Mailbox\ ‘db name’>eseutil /d ‘db name’.edb /t\\ testserver \defrag\temp.edb
  3. Now to mount the database back, execute the following command.D:\ Mailbox\ ‘db name’> mount- db ‘db name’

After performing all the steps, we can examine the database mailbox and see that all the white spaces have been removed and the EDB file is compressed.

When to Run Eseutil/D

There are many situations where offline defragmentation of Exchange database (EDB) is required. Some of which are mentioned where it is advisable to defrag Exchange database.

  • The database has a significant amount of space to successfully perform the defragmentation process.
  • After performing repair on the Exchange database using Eseutil/P, offline defragmentation should be performed to reduce Exchange mailbox database size & eliminate extra spaces.
  • When a mail storm occurs on a queue database residing in Exchange 2007 Hub Transport. It causes the queue to be full with emails and the queue expands when it needs to. When all the emails have been processed from the storm and an online defragmentation has been performed, free spaces are still left. Thus, offline defragmentation of Exchange database needs to be performed by running Eseutil/D to shrink the database.
  • If there are errors like Exchange jet error 1018 which affect the indexes of the database. Then in such cases, offline defragmentation would rebuild the indexes and fix the error easily.

When Not to Run Eseutil/D

Even though Eseutil/D solves many situations, but there are times when executing Eseutil/D is not the right solution to the problem. Some of the situations are mentioned here:

  • Eseutil/D should only be executed when it has enough storage space in the drive, as the process would require enough space.
  • Exchange uses online defragmentation for day-to-day maintenance. Offline defragmentation should not be used for maintenance purpose.
  • Eseutil/D should not be performed when the ESE-1018 error affects the data portion of the database. As the process would stop on seeing the error.
  • Offline defragmentation of Exchange database is done when the database is offline which means the users would not be able to access their emails. Thus if there is an option to move the emails to another database then it should be done to reduce the downtime of the users.

Eseutil offline defragmentation should only be done when the database is an inconsistent state.

Conclusion

If Size of Exchange Mailbox getting too large, in this situation the best way to reduce Exchange mailbox database size by using Eseutil offline defragmentation, which would scrap out all the white spaces and shrink the size of the Exchange Mailbox files. The most important thing to keep in mind is to dismount the mailbox database before performing the offline defragmentation of Exchange database. Even if the issue persists, then use the automated wizard mention here and save the entire Exchange database to the Outlook PST file.