When you add data to an Exchange database, naturally the size of the database will increase; but if you delete some mailboxes, the size of Exchange database may not necessarily decrease – it may remain same. For example, if your database size is 30 GB, and you delete 4 GB data, then the expected the size of the database would be 26GB. But you will notice that the size remains same, and it is 30 GB. However, space available to add new data will be 4 GB. This ‘Available new mailbox size’ is commonly known as Whitespace.
More about Whitespace
Whitespace is the area in Exchange database which is created by the deletion of an item or object (like a mailbox). The whitespace is reused by the Exchange database to store new items and objects. However, it will not be visible as said above. But, you can reclaim this space manually by removing the white space.
How to find White Space?
There are three ways to find the white spaces available in your Exchange Database. You can use the below commands to find white space.
- To check white spaces on a mailbox database, use:
- To check white spaces on all mailbox database on a server, use:
- To check white spaces on all mailbox database on all server, use:.
The manual approach to remove white spaces
You can remove white space from your Exchange database by Defragmentation. This defragmentation process is of two types- one is online and the other is offline.
- Online defragmentation
- Offline defragmentation
Online database defragmentation process is entirely automatic. You do not need to initiate it; Exchange will automatically run it every night. However, online defragmentation does not reduce the size of the database – it remains same. It removes the expired messages. It also cleans up deleted mailboxes on mailbox store. To reduce the size of the database, you should go for Offline defragmentation.
Offline database defragmentation helps to reduce the size of Exchange database. With the use of this process, you can compact the size of the database by eliminating the unused storage space. This process creates a new database having no empty pages (it replaces the older ones with the new ones or deletes the older ones). You can perform defragmentation by Eseutil facility. This process improves the efficiency of Exchange database. But you can do this only when you have large amount of free space.
Here is the process by which you can defrag your Exchange database:
- Before starting defrags process, you should ensure that how much amount of white space is available in Exchange database with the below command in Exchange Management Shell.
- Now after checking you have to dismount your Exchange database.
- Once you have dismounted Exchange database, defragment the databae
- Now run the defrag the dismounted database and mount the database again.
- After all the steps check the white space available in your database after defragmentation.
Some other Exchange issues
Apart from its large size, Exchange Database can be affected by many other issues including DDB file corruption. A corrupt EDB file becomes inaccessible to its users. So, the EDB files needs to be repaired at the earliest. But you can try third-party Exchange recovery tools to fix such issues. Kernel for Exchange Recovery is an efficient tool in fixing all Exchange related issues including corruption.