We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


Growing Database

ChrisTHall asked
Medium Priority
Last Modified: 2007-12-19
I am watching my Exchange database grow insanely high. Even today I have used up to 300MBs of storage I know we do not move that much mail internally in a day.  I have also removed and archived several email boxes.  I have not seen the database shrink any.  

What utilities can I use to crunch down my database.  I'm using Exchange 2003 with no service packs

Watch Question


I know I need to run the ESEUTIL, but it does not find it when I run it from a command line.  I can find it when I search the file structure, but it won't start from a command prompt


ok...in the message store properties is the maintainence section.  How can I tell it to start the compacting now...instead of waiting til midnight or something?


from reading other posts and such about the eseutil, does it mean I have to take the exchange server offline to recover the storage space?  I saw where my ese utility is running at night, but that apparently is only doing a defrag.  Last night it got interrupted.  I am wondering why it isn't crunching the database each night?


Can I run the eseutil integrity check while the database is in use?   Am beginning to think I am going to have to take the server offline and run the eseutil from a command prompt to get it to defrag and crunch the database using a mapped drive to another storage place.


I found this on one of the other posts about this question, will these steps work for me?

Actually this is what you would do:
1. Create a folder on the external drive, lets call it EXCHDB.
2. Stop the Information Store service on the Exchange server.
3. COPY the PRIV.EDB, PUB.EDB, ESE.DLL, and ESEUTIL.EXE files from the Exchange server to the EXCHDB folder.
4. Open a command prompt. Change directory to the EXCHDB folder on the external drive.
5. Run the following:
6. While step 5 is running rename the MDBDATA folder on ALL drives of the Exchange server to MDBDATA.OLD. Create a new MDBDATA folder wherever you renamed one.
7. If you are lacking space, then move the MDBDATA.OLD folders to a secure location on another machine. This way if something happens you can always get back to where you started from.
8. After step 5 completes you can copy the PRIV.EDB and PUB.EDB back into the appropriate MDBDATA folder on the Exchange server.
9. Start the Information Store service. You may receive a -1011 pop-up error. If so open a command prompt and change into the EXCHSRVR\BIN folder. Run the following:
10. Start the Information Store service.
Those steps in your last post are for Exchange 5.5. The process for Exchange 2003 is similar. Check the MS Knowledge Base for an article on how to run ESEUTIL on another server that does not have Exchange installed on it. This is only to be used if you don't have enough space on your Exchange server.

1. You must dismount the stores to run ESEUTIL /D against them.
2. Free space on a drive on the server must be equal or greater than 110% of the size of the databases being defraged. The size of the database is equal to the EDB+the STM files.
3. "but it does not find it when I run it from a command line"
This is because it is in the program files/exchsrvr/bin folder and usually this folder is not included in the Path variable.
4. The Exchange database will never reduce in size unless you run ESEUTIL /D.
5. After you have deleted data from the mailboxes, you must allow the online maintenance to complete AND the Deleted Item Retention time to expire before you will be able to recover the space with ESEUTIL /D.
6. Look for a recent event id 1221 in the application log. There should be one for the mailbox store and one for the public folder store. The value listed in this ID is the amount of space that will be recovered with ESEUTIL /D.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


so where do I set the deleted item retention parameter so that it will dump the data sooner?
Go to the properties of the mailbox store in the Exchange System Manager.


so if I set this to 0 days....it should dump them tonight....and then I can change it back?
You can change it back after the online maintenance completes.


Thanks...I would like to recap real quick to make sure I am on the same page.

I have gone in to the mailbox store and set deleted mailboxes to 0 days.  That should remove them tonight and the defrag should run tonight also.  This will or will not free up space from the stores?

if not then I need to take the email server offline and use the ESEUTIL program after reading using on a different server and that will compact the space.  This has to be an offline process right?

Thanks for all your help.


on an aside....how fast does the store suck up disk space?  I just freed up about a gig of storage by moving some log files off...and in the 2 hours that I did that it has use up half of that space for something. I know I did not move or have come into my system 500MB of mail?

You need to determine what you are trying to resolve.
Are your space issues related to .log files being generated by Exchange or just to physical size of the database?
If it is log files how often are you backing up your Exchange server? When a daily ONLINE Exchange backup is made then the log files that have been committed are purged from the disk. If you are doing individual mailbox backups, also known as brick level backups (BLB) then this will not purge the log files.

In answer to your questions:
"This will or will not free up space from the stores?"
It will allow physical space to be recovered by running ESEUTIL /D. Look for the event id 1221.
I call it online maintenance, some other call it online defrag. Either way it will NEVER physically reduce the size of the database. There is an article in the MS Knowledge Base that details what happens during online maintenance.

"if not then I need to take the email server offline and use the ESEUTIL program after reading using on a different server and that will compact the space.  This has to be an offline process right?"
This is correct.


well There are a huge number of log files in the MBDdata folder...I do a backup each night of the exchange server doing a brick level backup using veritas.  Should I change the backup to do a different way? the files only go back to the beginning of february. but there are about 3k of them.

Can I move them off to another storage location?  my priv db is 24GB and the stm file is 12GB.

So, what do you sugest I should work for?


On veritas I can not do a brick level and an information backup.  I have to do one or the other, so if i backup just the information store, which should remove the log files, right? Can I still recover individual mailboxes and emails?

Thanks again for all your help.
" I have to do one or the other, so if i backup just the information store, which should remove the log files, right? Can I still recover individual mailboxes and emails?"
With Exchange 2003 there is really no reason to run BLB's. Just back up the information store.

I will not give you the direct link but will point you to the MS Knowledge Base. Search for Exchange 2003 recovery storage group. I say this because you will retain more if you have to do the work as opposed to someone just telling you the answer.
There is a wealth of information in the knowledge base.

By properly configuring your deleted item retention, teaching your users and/or help desk how to recover their own deleted items, you can greatly reduce the need to restore individual mailboxes. Then if by some chance the deleted item retention time has passed, make use of the recovery storage group feature to recover what is needed.


I'll look into it...as I get time...wish I was a network admin 100% of the time...lol

So, it is ok if I move off the older log files from the mdbdata folder?  
Sure if you want to take the chance of corrupting your databases.
Seriously, no offense intended, but based on the questions you have been asking it would probably not be a good idea. You can corrupt your databases if you move the wrong files.
Just run a backup of your Exchange Information store using Veritas or NT backup. Why make the solution more difficult than it has to be.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.