The Exchange server EDB files will automatically grow in size as the data within the EDB files will increases. However, the Exchange EDB files will never compress if the data is removed from them, in fact the free space will be taken over by white spaces thereafter.
Different ways to handle oversized Exchange EDB file
- Create New Mailbox Database and transfer all data from the older mailbox to the newer Mailbox
- Perform Offline Defrag to shrink the EDB file
- Move the location of Mailbox Database
Solution #1: Move Mailbox Database using Exchange Management Console
EMC – Exchange Management Console can be used to dismount database and simple select the Mailbox, then right click on it and then select Dismount Database option. Follow the below steps:
- You need to launch the Exchange Management Console and then select Mailbox under Organization Configuration.
- After that select the mailbox that needs to be moved, then right click on it and select Move Database Path.
- After that you see Move Database Path window, provide new location for data files and log files. Then, click on Move to continue with the process to reduce the file size.
- And the, a message box will appear alerting that the database must be dismounted temporarily for accomplishing Move database operation. Click on Yes to continue the procedure.
Note- The time that the EDB mailbox takes to move to another location solely depends upon the size of mailbox database. Once the operation is accomplished, a task completion information box will appear. Click on Finish to close the wizard.
If you want to determine the size of Exchange EDB file and the existing white spaces then execute the commands in EMS (Exchange Management Shell) and once the file size is detected, you can compress it by executing Eseutil for defragging the mailbox. See below in detailed:
Solution# 2: Run Eseutil to Defrag EDB Mailboxes via Exchange Management Shell
If you wish to shrink the exchange EDB file which is keep growing to large, then there are few pre-requisites that must be fulfilled beforehand.
- The database must be dismounted before initiating the defrag procedure. While defragging is in process, users would not be able to access their emails.
- During the process, a new file will be created; however, the old file along with the new file as well as the temporary file generated by Eseutil will also exist on system. Ensure that enough storage space must exist on drive to enable defragmentation procedure to perform successfully. However, If enough storage space doesn’t exist on hard drive, different location can be specified while executing Eseutil command.
- You need to launch Exchange Management Shell and then execute the following command to dismount Mailbox database:
“C:\ Windows\ system32>cd D:\ Mailbox\ ‘database name’”
“F:\ Mailbox\ ‘database name’> Dismount-Database ‘database name’”
- Run Eseutil for defragging the EDB file
“F:\ Mailbox\’database name’>eseutil /d ‘database name’.edb /t\\ testserver \defrag\temp.edb”
- Next, execute the following command to mount the database:
“F:\ Mailbox\ ‘database name’> mount- database ‘database name’”
Now the database size and the existing white spaces on the selected mailbox database can be examined. Then you can see that the EDB file is compressed and all the white spaces are removed. With this, the Eseutil execution is done successfully and you can now run full backup of the database.
Note: You must have free disk space that is at least 110 percent the size of the database (EDB file) that you wish to defrag.
Alternate Solution – Modify Register Editor Settings
Alternatively, you can select to change the size specifications for the database by following the undermentioned procedure. In addition, you can split the EDB file to prevent large data loss situations.
- In Register Editor, search for the given path:
- If “Database Size Limit in GB” DWORD exists under “Private-[database GUID]” then modify the value to GB (gigabytes). If it doesn’t appear then create DWORD “Database Size Limit in GB”, and then set storage limit in gigabytes.
- Relaunch the Exchange Information Store
- In the Event Viewer, check for “Event ID 1216” to access the current size
By using this process, you can easily increase exchange EDB data storage capacity which in turn reduces the Exchange data corruption instance to a larger extent.