How to Run Eseutil /D (Defragmentation)
Topic Last Modified: 2006-06-09
This section explains how the Eseutil command can be used to defragment, and or compact Exchange database files offline for all versions of Exchange. For more information about understanding Eseutil /D, see Eseutil /D Defragmentation Mode.
Before you defragment a database using Eseutil, note the following:
Make sure you have free disk space equal to 110 percent of the end size of the database that you want to process (the end size being the current file size minus the size of the white space in the file).
Dismount the database before defragmenting as Eseutil performs an offline defragmentation. During the offline defragmentation the dismounted database will be inaccessible to clients.
In Exchange System Manager, right-click the database that you want to defragment, and then click Dismount Store.
At the command prompt, change to the Exchsrvr\Bin folder, and then type the Eseutil /d command, a database switch, and any options that you want to use. For example, the following command (all on one command line) runs the standard defragmentation utility on a mailbox database:
C:\program files\exchsrvr\bin> Eseutil /d c:\progra~1\exchsrvr\mdbdata\priv1.edb
Use the following database switch to run Eseutil defragmentation on a specific database:
Eseutil /d <database_name> [options]
Stop the service that controls the database you wish to defragment by using the Services applet in Control Panel.
For the Exchange Directory database, stop the Microsoft Exchange Directory service.
For the Exchange Mailbox or Public Folder databases, stop the Microsoft Exchange Information Store service.
At the command prompt, change to the Winnt\System32 folder, and then type the Eseutil /d command, a database switch, and any options that you want to use.
For example, the following command runs the standard defragmentation utility on the directory and saves the copy in the user-defined file:
C:\winnt\system32> Eseutil /d /ds /tc:\dbback\tempdfrg.edb /p
Use one of the following database switches to run Eseutil on a specific database.
Option Description ---------------------------------------- /ds Directory /ispriv Private information store /ispub Public information store
Use one or more of the following options to specify the operations that you want to perform on the database.
Option Description ----------------------------------------------------------------------- /b <path> Makes a backup copy of the original uncompacted database at the specified location. /p Retains and preserves the original uncompacted database in its original location and stores the new compacted database in the default file Exchsrvr\Bin\Tempdfrg.edb. /t <file_name> Creates and renames the new compacted database in the specified path. /o Does not display the Microsoft Exchange Server banner.
This is the command line reference that can be seen by typing Eseutil ./? at the command prompt in the Exchsrvr\Bin folder, and the selecting D for defragmentation
DEFRAGMENTATION/COMPACTION: DESCRIPTION: Performs off-line compaction of a database. SYNTAX: ESEUTIL /d <database name> [options] PARAMETERS: <database name> - filename of database to compact OPTIONS: zero or more of the following switches, separated by a space: /s<file> - set streaming file name (default: NONE) /t<db> - set temp. database name (default: TEMPDFRG*.EDB) /f<file> - set temp. streaming file name (default: TEMPDFRG*.STM) /i - do not defragment streaming file /p - preserve temporary database (ie. don't instate) /b<db> - make backup copy under the specified name /8 - set 8k database page size (default: auto-detect) /o - suppress logo NOTES: 1) If instating is disabled (ie. /p), the original database is preserved uncompacted, and the temporary database will contain the defragmented version of the database.
For more information, see the following topics in the Exchange Server Database Utility Guide: