6.16. Performing an Offline Defragmentation
Problem
You want to reclaim whitespace from your Exchange database, so you need to take it offline and defragment it.
Solution
Using a command-line interface
Dismount the Exchange Server database to be defragmented as described in Recipe 6.8.
Open a command window (cmd.exe).
Change to the directory where the database you want to defragment is located. This is optional, but it will save you some typing in the next steps.
Run the eseutil utility to defragment the database:
> eseutil /d /p "
\pathToDBFile\dbName.edb
"Wait. Database size and the amount and location of whitespace affect the time it takes to defragment it.
When defragmentation completes, remount the store as described in Recipe 6.7.
Use the recipes in Chapter 11 to make a full online backup. When you defragment the database, its database signature changes, so previous log files can't be applied against the new EDB/STM pair.
Discussion
In normal operation, it is almost never necessary to defragment the database as it will simply grow again as more messages are sent and received. Some activities can return large amounts of space to the database whitespace pool. For example, moving large numbers of mailboxes off a server will mean that the space formerly used by those mailboxes is available; if you move enough mailboxes, this savings can be significant. To run an offline defragmentation, Microsoft recommends that you have 110% of the database size available as free disk space—for a 40 GB database, ...
Get Exchange Server Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.