Exchange Database Defrag: always a pain!
I have to compact my Exchange Server database, due to lack of free space on the HD. Is it always a manual operation I have to do or there is a way to make it automatic? What happens if the Server run out of free space on the HD? Does the database dismount itself?
July 16th, 2009 5:00pm

Yes, if server runs out of space on the database hdd, it dismount itself... To compact the Exchange database you need to perform offline defragmentation, refer below similar thread and let us know if you have any doubt... http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/75273abb-56bc-4e6f-b84c-f28aab2843fa/#3f3f20e1-5b48-4b44-b672-c51f6d887188Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2009 5:17pm

To add to Amit... eseutil is not something that should be used as routine maintenance. You really should either add some HD space or set some mailbox limits/archiving/auto-deletion to prevent over subscribing your storage...just my $0.02-alex
July 16th, 2009 8:02pm

I had to chime in here as well. Frequently running ESEUTIL is not a good thing. Unless you have recently purged massive amounts of e-mail or mailboxes, there is no reason to defrag the database. I think the mindset of doing frequent defrags comes from the old Exchange 4.0 / 5.0 days where if you did not defrag your databases frequently, they could become corrupt. I have to agree with Alex, get some more hard disk space and spend your nights or weekends doing something else. :-)Jim McBee - Blog - http://mostlyexchange.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2009 9:07pm

...and just to make this post as long winded as possible: Look for event 1221 in your Exchange server's application log. This will be present for each database on your system (including public folder) and tell you how much space you stand to gain from an offline defrag. Before I knew this I had defragged many a database to realize I was only getting a few megs back after hours invested. :) Mike Crowley A+, Network+, Security+, MCT, MCSE, MCTS, MCITP: Enterprise Administrator / Messaging Administrator
July 17th, 2009 1:19am

I guess I mentioned these points in reference thread... :) http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/75273abb-56bc-4e6f-b84c-f28aab2843fa/#3f3f20e1-5b48-4b44-b672-c51f6d887188 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Offline defragmentation with eseutil utility is the only thing to reduce the size of database. Alternatively you can move all the mailboxes to another database (you can create more than one DB only if you have Enterprise edition) which has database files (edb and stm) on the partition where you have enough space and delete the current DB. Refer below article on how to defrag DB. You can use /t switch to give temporary path of your shared network drive foroutput filesince you don't have 110% of free space on the derive where current DB sits. How to defragment with the Eseutil utility (Eseutil.exe) http://support.microsoft.com/kb/192185 Before running offline defrag make sure that onlinemaintenancecleaned up the space and you have enough white space to to reduce. White space shows in 1221 is the approx amount of space you can reduce with offline defrag. Online defragmentation has completed a full pass on the database; Review the Application log for event 1221 to make sure that online maintenance finished successfully http://technet.microsoft.com/en-us/library/bb217852.aspx Why you shouldn't consider it as regularmaintenance. Is offline defragmentation considered regular Exchange maintenance? http://msexchangeteam.com/archive/2004/07/08/177574.aspx -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Besides, Daniel, Which version and edition of Exchange do you use? If Exchange 2003 Standard, it doesn't allows you to create another database for move mailbox operation while cleanup the DB for deletion.Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2009 5:54am

Yes, i removed lots of e-mail recently, in fact if I sum all the mailboxes' dimensions I have 4 GB; but if I check the Exchsvr folder I can read a total of 23 GB. I think Exchange has never been defragged. The server has 'only' a total native HD capacity of 35 GB; now there's only 1,5 GB of free space and it's decreasing day by day. I have already contacted a support service to analyze the problem, btw thanks to all of you for your suggestions!!
July 23rd, 2009 11:16am

Hi Mike, i'm new to exchange, can you tell me exactly where i can see this event log you talk about? Thanks!
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2009 11:19am

Hi,In the servers application event log.Leif
July 23rd, 2009 11:27am

Hi, the server i'm talking about is a Small Business Server 2000 edition...
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2009 11:27am

Small Business Server is no exception.-Open the event viewer-expand windows logs-select application log-right-click application log and choose "filter current log"-clear <all event ids> and type 1221 in this space-click ok Mike Crowley A+, Network+, Security+, MCT, MCSE, MCTS, MCITP: Enterprise Administrator / Messaging Administrator
July 23rd, 2009 4:34pm

Hi, I returned here after long time because I still have the problem, only in the meantime I have changed Server, virtualizing the old SBS2000 into a new Server 2008 R2 machine. Now the Exchange folder is into a larger disk, but still it's increasing day by day... If I check inside it, I can see tons of log files (5MB), the oldest of them have been created in February (the last time I performed a 'eseutil'). Shouldn't they compact themself into the database after some time? I remember the last time I ran both eseutil /p and eseutil /d... @Mike: I checked, no event 1221 at all... should I worry?
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2010 12:15pm

If you are seeing those logs increase day by day that means you have a bigger problem on your hands, that being that you are NOT doing backups of the Exchange environment. Those logs will get committed properly once you have performed a backup of your Mailstore. This is obviously critical and something that should be done nightly!
May 7th, 2010 5:33pm

Hi, I returned here after long time because I still have the problem, only in the meantime I have changed Server, virtualizing the old SBS2000 into a new Server 2008 R2 machine. Now the Exchange folder is into a larger disk, but still it's increasing day by day... If I check inside it, I can see tons of log files (5MB), the oldest of them have been created in February (the last time I performed a 'eseutil'). Shouldn't they compact themself into the database after some time? I remember the last time I ran both eseutil /p and eseutil /d... @Mike: I checked, no event 1221 at all... should I worry? 1) As mentioned, you need to be running online backups to clear out the transaction logs. This should be run at least nightly. 2) Read http://support.microsoft.com/kb/271222 Missy
Free Windows Admin Tool Kit Click here and download it now
May 7th, 2010 10:13pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics