Here's all the info you need for this operation. taken from microsoft KB articles 159306,182903,192185,244525:
Database Compaction
Database compaction is a function of the JET database engine, and is not under the stores control. There is some amount of online compaction that goes on in the background, as needed. This process cleans up the space made available by background cleanup. There are times that compaction will not be able to efficiently keep up and it will log the following Event ID in the application log:
Event ID = 63
Source = EDB
Category = General
Description = MSExchangeIS ((44)) Background Cleanup skipped pages. Database may benefit from defragmentation
This Event ID means that an offline defragmentation of the Information Store database should be scheduled and performed. Offline defragmentation is performed by using the Edbutil.exe utility with the "/d" option. This process is performed against each database separately (Priv.edb for the private store, Pub.edb for the public store).
DEFRAGMENTATION (D)
DEFRAGMENTATION/COMPACTION:
DESCRIPTION: Performs off-line compaction of a database.
SYNTAX: ESEUTIL /d <database name> [options]
PARAMETERS: <database name> - filename of database to compact, or one of
/ispriv, /ispub, or /ds (see NOTES below)
OPTIONS: zero or more of the following switches, separated by a space:
/l<path> - location of log files (default: current directory)
/s<path> - location of system files (e.g., checkpoint file)
(default: current directory)
/b<db> - make backup copy under the specified name
/t<db> - set temp. database name (default: TEMPDFRG.EDB)
/p - preserve temporary database (i.e., don't instate)
/o - suppress logo
NOTES: 1) The switches /ispriv, /ispub, and /ds use the Registry
to automatically set the database name, log file path,
and system file path for the appropriate Exchange store.
2) Before defragmentation begins, soft recovery is always
performed to ensure the database is in a consistent state.
3) If instating is disabled (i.e., /p), the original database
is preserved uncompacted, and the temporary database will
contain the defragmented version of the database.
Defragmenting an Exchange Server 5.5 Database
NOTE: Defragmenting a database requires free disk space equal to 110 percent of the size of the database that you want to process.
Stop the service of the database you wish to defragment by using the Services tool 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
The Tempdfrg.edb file is created on the logical drive from which the eseutil /d command is run unless you use the /t switch. For example, to create a Tempdfrg.edb on the root of drive D, run the following command:
D:\>eseutil /d /ispriv
Good luck!