Defragmenting a Oversize Exchange Database

posted 23 Jun 2011, 11:13 by Tristan Self
Recently I had the joy of an oversize (16GB) exchange database that would not  mount, I needed to do a emergency defrag of it and hes what I did.

1. First shutdown Exchange completely, including the information store  service, to ensure we get a clean shutdown.

2. Now copy the files priv1.edb and priv1.stm files to another location as to  defrag a database you will need 110% of the size of the database in free disk  space.

Therefore moving to another drive is normally a good way of doing this, if  the drive is on a computer without exchange follow these instrcutions from  Microsoft "How to run Eseutil on a computer without Exchange Server" at http://support.microsoft.com/kb/244525/en-us

3. In this example ive copied the files to c:\edb and created within that  another folder called "backup" with the path c:\edb\backup.

4. First run a integrity check of the database using the command below and if  its ok, you can carry on.

eseutil /k "c:\edb\priv1.edb"


5. Now you can perform the defrag, in my example I wanted to preserve the  copies I made so I have at least one copy at all times of a working database  that I can go back to if it all goes wrong, i used this command:

eseutil /d c:\edb\priv1.edb /p /t c:\edb\backup\temp.edb /f  c:\edb\backup\temp.stm

See this link for more information: http://support.microsoft.com/?id=192185

6. After it finishes delete your orignals in "c:\program  files\exchsrvr\mdbdata\priv1.edb" and "c:\program  files\exchsrvr\mdbdata\priv1.stm".

7. Copy the two temp files which are the defragmented databases from  "c:\edb\backup\temp.edb" and "c:\edb\backup\temp.stm" to "c:\program  files\exchsrvr\mdbdata\temp.edb" and "c:\program  files\exchsrvr\mdbdata\temp.edb" respecitvely.

8. Rename them so they have the following names: "c:\program  files\exchsrvr\mdbdata\priv1.edb" and "c:\program  files\exchsrvr\mdbdata\priv1.stm"

9. Remount your defraged database.
Comments