Exchange Server Cookbook: For Exchange Server 2003 and Exchange 2000 Server
Recipe 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
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 spacefor a 40 GB database, then, you should have at least 44 GB free.
When you use eseutil's /d option, it systematically scans through the EDB and STM files for the specific database, rearranging pages to make all of the tables, indices, folders, attachments, streamed objects, and messages contiguous. Normally, it does this by following a simple process:
Step 3 can take a significant amount of time, so you can instruct eseutil to skip it with the /p option. This forces eseutil not to copy the temporary file or overwrite the existing file; you'll have to do that manually before you can mount the database. Alternatively, you can use the techniques in Recipe 6.9 to change the database paths to point to the newly defragmented file. See Also
Recipe 6.9 for changing database and log file paths, Recipe 6.17 for shrinking an oversized Standard Edition database, Recipe 11.2 and Recipe 11.3 for completing a full online backup, MS KB 328804 (How to Defragment Exchange Databases), MS KB 192185 (How to defragment with the Eseutil utility [Eseutil.exe]), and MS KB 254132 (Eseutil /d defragments the database and the streaming file) |