What to Do If Exchange EDB File is too Big?
Exchange database or EDB file is the primary repository where the Exchange Server stores all the users’ mailbox data, like emails, attachments, etc. and various other components. With continuous accumulation of users’ data and other information, the EDB file grows in size and may reach the threshold limit defined for the database file. When the EDB file becomes too big, it can lead to performance issues, slow search results, and various other issues. Moreover, large EDB file is highly prone to corruption or damage. So, it is important to keep a tab on the EDB file size and reduce the file size if it is too big. In this article, you will learn some ways to reduce the Exchange EDB file size.
Ways to Reduce the EDB File Size if it is too Big
You can try deleting any unnecessary items from the Exchange database file, such as duplicate items, obsolete emails & attachments, etc. that are no longer required. If this doesn’t help much, then follow the methods provided below to reduce the EDB file size.
Method 1: Perform Offline Defragmentation
When you delete any item from the database, the storage space that becomes available to store new data is occupied by white space. Due to this, you may find that EDB file size is still the same even after deleting the items. To remove this white space and reduce the EDB file size, you can perform offline defragmentation.
To perform defragmentation, you need to first dismount the database. For this, run the following cmdlet in Exchange Management Shell (EMS):
Dismount-Database [-Identity] <DatabaseIdParameter>
When the database is dismounted, run the eseutil /d cmdlet as given below to start defragmentation of the database.
eseutil /d [name of the database] /T [location of temporary path]
Note: Before starting defragmentation, ensure that you have enough free storage space (110% of the size of the database) available.
You can see the progress of the defragmentation process in the defragmentation field.
It is important to note that the defragmentation process takes a lot of time to get completed and the database cannot be mounted on the server unless the process is completed. This will result in downtime for the users who have their mailboxes in the database. So, perform this process after working hours or in maintenance window.
To check the size of the database after defragmentation, you can use the Get-MailboxDatabase cmdlet as given below:
Get-MailboxDatabase | select Name, DatabaseSize, AvailableNewMailboxSpace
Method 2: Move Mailboxes to Another Database
To reduce the size of EDB file, you can move some mailboxes to a new or another existing database.
If you want to move mailboxes to a new database, create a new database by using the following cmdlet:
New-MailboxDatabase -Server SERV1 -Name “DBX1” -EdbFilePath D:\ExchangeDatabases\DB1\DB1.edb
Note: If you are moving mailboxes to a new database, you need to consider the license type of your Exchange Server. For example, if you have the Standard license, you can have up to 5 databases mounted at a time.
If you want to move the mailboxes to an existing database on the server, you need to check the available space on the database. For this, you can use the Get-MailboxDatabase cmdlet.
Now, to move the mailboxes, you can run the New-MoveRequest cmdlet in the EMS as given below:
New-MoveRequest –Identity <mailbox identity> -TargetDatabase <database identity>
To check the status of the move requests, you can use the following cmdlet:
Get-MoveRequest [[-Identity] <MoveRequestIdParameter>]
Method 3: Export Mailboxes to PST
You can also export the mailboxes (old or obsolete) to PST file as a backup and then delete the mailboxes to free up the space and reduce the EDB file size. To export user mailboxes to PST file, you can use the New-MailboxExportRequest cmdlet in the EMS (see the below example).
New-MailboxExportRequest -Mailbox User1 -FilePath \\EX01\PSTFiles\User1.pst
This cmdlet will export the mailbox — named User1 to PST file on EX01 server as User1.pst.
Note: You cannot export public folders and disconnected mailboxes by using this cmdlet.
To get the status of the export process, you can use the Get-MailboxExportRequest cmdlet.
Conclusion
When the Exchange EDB file gets too big, it can result in performance degradation and cause issues, like slower email access or search operations, etc. To avoid this, you can reduce the size of EDB file. For this, you can follow the ways mentioned in this article. As an alternative, you can use a third-party EDB to PST converter software, such as Stellar Converter for EDB. It can open EDB file in any state (offline or online) and of any version of Exchange Server — 2019, 2016, 2013, 2010, 2007, 2003, 2000, or 5.5. If you want to backup the mailboxes, then you can save them to PST and other formats, such as EML, MSG, and PDF. If you want to move the mailboxes to a new or another database, then this software offers an option to directly export the mailboxes to a live Exchange Server database. It also allows to export the EDB file data to Microsoft 365 tenant.