Methods to find white space in Exchange
It is important for IT administrators to regularly check for white spaces & remove them to increase the efficiency of the system. Here are three professional approaches to finding white space in Exchange.
Checking white spaces in a specific mailbox database
For checking white spaces in a specific mailbox database, you will have to execute the below command:
Get-MailboxDatabase <Database Name> -status | Select-Object Server,Name,AvailableNewMailboxSpace
In this command, is the name of the specific mailbox database whose white space you wish to check. The command selects & displays all the information related to the mailbox database from its server name to available mailbox space. This info. will help you decide whether to move mailboxes or to clear the whitespace from the mailbox database.
Checking white space on multiple mailbox databases on a single server
The second method is much more efficient in case you need to check multiple mailbox databases on a single Exchange server. To use this method, open the Exchange Management Shell & type the following given command:
Get-MailboxDatabase -Status -Server <ServerName> | Select-Object Server,Name,AvailableNewMailboxSpace
This command will show the available space for all mailbox databases on the specified server. You can use it to quickly identify any databases that are running low on space.
Checking white space on all mailbox databases across all servers
To check white space on all mailbox databases across all servers in your Exchange environment, you can go for the following command:
Get-MailboxDatabase -Status | Select-Object Server,Name,AvailableNewMailboxSpace
This command will retrieve the white space information for all the mailbox databases in your Exchange environment.
Defragmentation to remove white space in Exchange
Defragmentation is a process that compacts the Exchange database by getting rid of the unused storage space & helps in the creation of a new database with no empty pages. This process works via the Eseutil utility 1, which requires the Exchange server to be dismounted. Also, note that defragmentation can be carried out in two ways – Online & Offline.
Online defragmentation The Online defragmentation process is an automated process carried out by the Exchange Server every night. This process does not reduce the size of the database but instead removes the expired messages & cleans up the deleted items. This assists to maintain the optimal level of database performance.
Offline defragmentation On the other hand, the Offline defragmentation process is a manual approach that can only be done by dismounting the Exchange server. This process is useful in reducing the size of the database by eliminating the empty pages. The defragmentation process replaces the older pages with the new ones or deletes them entirely.
When performing the Offline defragmentation method, it is vital to make sure that there is a substantial amount of free disk space available. This is to prevent the occurrence of potential data loss or corruption that may affect the Exchange database’s integrity.
Performing defragmentation in Exchange database
Follow our step-by-step guide instructions to defragment your Exchange database efficiently.
- Tools used: Kernel for Exchange Recovery
Step 1: Check the amount of whitespace available in Exchange database
Before beginning the defragmentation process, you must know about the whitespace available in your Exchange database. To check this, run the given command in Exchange Management Shell:
Get-MailboxDatabase <Database name> -Status | Format-List Name, DatabaseSize, AvailableNewMailboxSpace
This command will give you the info. about the database name, its size & the amount of whitespace available in the database.
Step 2: Dismount the Exchange database
The next step in defragmenting the Exchange database is to dismount the database. For this, you need to follow this command:
Dismount-Database <database name>
This command will dismount the database & make it unavailable for use.
Step 3: Defragment the Exchange database
After dismounting the Exchange database, execute the below command syntax to defragment:
Eseutil /d <database_name>
This command will begin the process & remove the whitespace from the database. Also, it will rearrange the data to minimize the physical size of the database. It may take some time as it totally depends on the database size.
Step 4: Verify database health
As you finish the defragmentation process, it is recommended that you verify the database’s health by using the given command:
Eseutil /mh <database name>
You can get all the header information of the database. Thus, you must keep in mind that the database is in a clean shutdown state else you must troubleshoot the dirty shutdown error.
Step 5: Mount the Exchange database
Next, it is time to mount the Exchange database. Type this command to do so:
Mount-Database <database name>
With this command, you will be able to mount the database & resume using it.
Step 6: Check the amount of whitespace available in Exchange database
Lastly, check the amount of whitespace available in the Exchange database again via the command mentioned in step 1. This will help you to confirm that the defragmentation process completed successfully & the whitespace has been removed from the database.
Automated solution to fix any Exchange issue
We now know that this unused whitespace can cause performance, storage & backup issues in Exchange servers & can lead to database crashes & corruption. The only way to deal with white space is to perform an offline defragmentation of the database file, which is a complicated & time-consuming process.
But, there is a simpler & more efficient solution available – the Kernel for Exchange Recovery 1 tool. This specialized tool can effectively recover mailboxes from corrupt EDB files that are affected by white space issues. It uses a deep invasive scan to recover all the data from offline & dismounted files & saves them to your preferred destination. It is a recommended recovery solution by seasoned Exchange experts & MVPs, as it can handle all the complexities of data recovery with ease.
Last thoughts
You have seen the solutions to remove white spaces in Exchange database. For good results & outcomes, a manual approach is suggested but if you want quick & easy resolution then using a professional tool like Kernel for Exchange Recovery is the best available option. The tool allows users to recover even corrupt & permanently deleted EDBs from the Exchange server. Try out this feature-rich tool today & discover what it can do with Exchange database corruption.