Link to home
Start Free TrialLog in
Avatar of RLLSTech
RLLSTech

asked on

How to compact the Exchange 2007 Databases

There are a billion how-to's on the 'net.  I'd like a real world answer to this question.

Very simply stated, how does one go about compacting the Exchange 2007 Databases on a Windows Server 2003 R2 Standard x64 box?  What services, if any, do I need to stop, is this a command line function, and if so, what are the exact switches, etc?

Thanks!
Avatar of dano992
dano992

you can do a offline defrag using the ESEUTIL
that will reclaim all free space available

Very simply stated, how does one go about compacting the Exchange 2007 Databases on a Windows Server 2003 R2 Standard x64 box?

Well, if you are asking for what sort of real world solution is about (which includes MNC like WalMart - Microsoft - Netware - Shell - HP) uses - no one ever touches those switches EVER. For a simple reason Eseutil means that database has to go offline (that's a crime in today's world - ask your boss if you dont believe me). So now, what do we do ?

***We create a new mailbox store on the same server.
***Move mailboxes from source store to target store (in small batches over weekends)
***Once all mailboxes have been moved - this means that the corruption is also removed from your store including white spaces (since move mailbox would never carry empty spaces).
***Verify if the target store is working fine.
***Mount blank store (for source store)
***Move mailboxes back to this store (using the above steps)
***Now, what you have is a database that is corruption and white spaces free.
***Once, done DELETE the old store (which was earlier target store).

This requires ZERO amount of downtime - that is why it is preferred globally.

Is that clear ???

Avatar of RLLSTech

ASKER

Crystal clear.  That option was actually considered, but we're only a 47 user law firm, going offline at night is an option for us.  And this needs to be accomplished over the course of one evening.

So now that we know I can go offline.  What's the procedure?
ASKER CERTIFIED SOLUTION
Avatar of Exchange_Geek
Exchange_Geek
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you.  I understand all but one part:

"Once done. Please rename the log files folder (go to property of storage group in ESM) and replace with an empty folder - THIS IS IMP"

So, before I restart any services or remount the stores, I rename the folder in which the tracking logs are stored?

If I'm looking in the right place, I see this, "E:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs\MessageTracking"  Is that correct?

Didn't i mention storage group properties ?? Those are located above your stores.

I was referring to transaction logs and not message tracking logs buddy.

The reason why it is important to rename the log file folder since the database signature gets changed after your eseutil is run over it and hence it cannot be associated with old log files. Hence, it would require new set of log files.

You probably did.  I apparently don't absorb everything I read.  Anyway, I rename the folders, create a new folder for the transaction logs, then point the storage group properties to the newly created folder, correct?

Sorry for so many questions.  I've done some of this stuff on test servers, but not enough that I know it from memory.  Since this will be done on a live server, I really, REALLY don't wanna hose anything. :)
You do not need to make any changes at storage group since you would be recreating that folder.
Say for example if you have the log files folder named at  C:\LOGS - so you would be renaming this folder to say LOGS1 - and now you would recreate a blank folder with the name LOGS.

So nothing change at configuration level of Exchange.
Got it.  I'm going to do this now.  I'll report back with the results.
If you have the hard disk space but the problem is that the message store is too large then surely you could just increase the maximum size of the message store - <a href="http://technet.microsoft.com/en-us/library/bb232092.aspx">see Technet</a>. A 2 minute registry change and a service restart must be easier than some of the above suggestions...
@CharAP: the question is "How to compact the Exchange 2007 Databases" Not how to reduce or prevent from having a big store. If it had been the latter - you had given a good solution, also it would have been a better resolution to divide mailboxes across multiple stores simple.
Everything worked beautifully.  Thank you.