Home » Blog » Exchange Server » How to Remove White Spaces In Exchange Database? Complete Solution

How to Remove White Spaces In Exchange Database? Complete Solution

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

Summary: Are you facing trouble for finding the solution on how to remove white spaces in Exchange database? If yes, then this write-up will guide users to remove the white space by using the solution provided here.

Nowadays storage space in Exchange Server is a major concern. When users or IT admin remove data from mailbox database in order to reduce the space but after removing the content the size of the Exchange database appears to be unchanged and to reclaim the unused/free/left (space which is also called white space), users need to defrag the database.

Let’s understand about white space with the example given below:

Suppose you remove the 50 GB of data from the 100 GB Exchange mailbox database. So, the remaining size of database should be 50 GB but after reducing the size you see that the space of the Exchange database remains the same i.e. 100 GB. The remaining 50 GB of data is still there and that free/unused space is called white space. To reclaim this space users have to remove white space Exchange 2010/2013/2016 database.

Use PowerShell Command to Find White Space In Exchange Database

Follow the Exchange PowerShell cmdlet given below to find the white space in the mailbox database:

1. Get-MailboxDatabase | select Name,DatabaseSize,AvailableNewMailboxSpace

powershell command 1

This command return the two properties such as: “DatabaseSize” & “AvailableNewMailboxSpace” but this PowerShell cmdlet doesn’t display the details of these properties. For this, users have to use the command given below:

2. Get-MailboxDatabase -Status | select Name,DatabaseSize,AvailableNewMailboxSpace

powershell command 2

Here, the “-Status” parameter returns the details of the database size and available new mailbox space.

If user wants to know the white space in volume, then they can use the following the command given below:

Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto

powershell cmdelt 3

Here, we can see that the mailbox database “testing” has 512 MB and the white or available space is 82.03 MB. This reclaim this unused storage you have to perform defragmentation. This process also improves dis performance and operations of MS Exchange Server.

Manual Solution For How to Remove White Spaces In Exchange Database

As we discussed that the white space can be remove by defrag the mailbox database. Users can carried out this process by using the Online & Offline.

1. Online Defragmentation

Users need to initiate this process, it is done automatically. Microsoft Exchange run the online defragmentation every night but this process doesn’t reduce the Exchange database size. It removes expired messages, cleans up the delated EDB mailboxes on mailbox store.

Note: To reduce the size of mailbox database, users should go for the offline defrag process.

2. Offline Defragmentation

This process helps users to reduce mailbox database size. ESEUTIL utility helps you to perform the offline defrag the Exchange database. It is necessary to do this defragmentation after office hours because it’s a time-consuming process and the Exchange mailbox database should be offline or dismounted.

There should be enough space to perform offline defragmentation. Otherwise, it would be problem.

Note: You can check the solution given below to know how much storage space it requires to perform defrag.

Mailbox Database Size – Available space x 1.1

Example: The size of “testing database” is 512 MB and the available space is 82.03 MB.

Then, 512 – 82.03 = 429.97

429.97 x 1.1 = 472.967

You need 472.967 MB of extract storage space

Note: Before starting the defragmentation process, always take the backup of Exchange database because if anything happen with the mailbox database then you have an extra file to retrieve the data.

Pro Tip: In case, if your Exchange database file is severely corrupted/damaged/unhealthy, then you can use EDB Recovery Software easily recovers mailbox corruption Exchange 2010/2013/2016 and EDB file with no data loss without using any New-MailboxRepairRequest PowerShell cmdlet. After recovery, users can export recovered & healthy mailboxes to Exchange Server, O365 & various file formats. The utility is capable to convert Exchange database to PST / EML / HTML / MSG / MBOX / PDF file.

Download Now Purchase Now

Solution to Remove White Spaces In Exchange Database

Follow the cmdlets given below:

1. Run Exchange Management Shell >> Navigate to the folder where mailbox database is located

locate database

2. Dismount Exchange database

dismout database

3. Execute the eseutil /d switch to defrag the mailbox database

eseutil command

4. After the process complete, mount the Exchange database

mount database

5. Use the Get-MailboxDatabase command and see all white space are removed

get-mailboxdatabase

Take the entire backup of the Exchange database after using the eseutil cmdlet.

Bringing It All Together

Now users have detailed information about white space and solution how to remove white spaces in Exchange database by defrag the Exchange mailbox database with the help of ESEUTIL command. In case, if your Exchange database is highly corrupted, then you can use the EDB Recovery software provided here to recover the database from corruption without any loss of database and export Exchange mailbox to PST & different file format. Also, users can export mailboxes to Exchange Server and Office 365 in a hassle freeway.