Solved

Do I need to compact my Exchange 2003 database?

Posted on 2010-11-08
6
613 Views
Last Modified: 2012-06-27
I have an Exchange 2003 server which has been in service for about 5 years so far. The database size has been growing steadily, as expected. It is currently about 85GB in size. It never seems go get smaller, just bigger. Sometimes when people leave the company and their email is archived off the server, I expect that the database size would shrink at least a little within a few weeks, but it does not. Even when we had a big layoff a couple years ago.
Is their something I need to do? I understand that it may just be converting to white space when I archive and delete an account, but if that was the case then the size would at least remain steady for a while after deleting a user as the white space gets re-used instead of the database growing, but it still seems to grow regardless. Is it recommended that I do some sort of offline compaction of the database, or should I just leave it alone if there are not really any problems? I still have more space to grow into, but it won't last forever. I am hoping to get another 2 years out of it.
0
Comment
Question by:robw24
6 Comments
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
Comment Utility
As you have stated the database will never shrink without an offline defrag.

however offline defrag is useless starting exchange 2003 SP2

>>"I understand that it may just be converting to white space when I archive and delete an account,"

perfectly true

>>"but if that was the case then the size would at least remain steady for a while after deleting a user as the white space gets re-used instead of the database growing"

in theory yes however the space used is not always contiguous it is random, the white space will be reused however not necessary directly

if you are running enterprise version of exchange just create another mailbox database and move all the users to it.

if you decide you still want to do an offline defrag this is how to do it
http://www.petri.co.il/defragment_exchange_2000_2003_server_databases.htm
0
 
LVL 15

Expert Comment

by:JBond2010
Comment Utility
You can do an offline defrag of the database.

Defragmenting an Exchange 2000 or Exchange 2003 database
Note Defragmenting a database requires free disk space equal to 110 percent of the size of the database being processed.
In Exchange System Manager, right-click the information store that you want to defragment, and then click Dismount Store.
At the command prompt, change to the Exchsrvr\Bin 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 a mailbox store database:
C:\program files\exchsrvr\bin> eseutil /d c:\progra~1\exchsrvr\mdbdata\priv1.edb
Use the following database switch to run Eseutil defragmentation on a specific database:
eseutil /d <database_name> [options]
Defragmentation/Compaction
Performs off-line compaction of a database.

Syntax: eseutil /d <database_name> [options]

Parameters: <database_name> is the file name of the database that you want to compact.

You are not required to use any of the following options, but you can use one or more (separated by a space) to specify the operations that you want to perform on the database.
Option         Description
----------------------------------------------------------------
/b<database>   Make a backup copy under the specified name

/t<database>   Set the temporary database name (the default is
               Tempdfrg.edb)

/s<file>       Set the streaming file name (the default is NONE)

/f<file>       Set the temporary streaming file name (the default
               is Tempdfrg.stm)

/p             Preserve the temporary database (in other words,
               do not instate)

/o             Suppress logo

/i             Do not defragment streaming file
                              

Note If instating is disabled (for example, if you use the /p option), the original database is preserved uncompacted, and the temporary database contains the defragmented version of the database.

For more information about Exchange Server versions 4.0 and 5.0, click the following article number to view the article in the Microsoft Knowledge Base:
163627  (http://support.microsoft.com/kb/163627/ ) How to defrag an EDB file on a non-Exchange server
For more information about how to run Eseutil on a computer without Exchange Server, click the following article number to view the article in the Microsoft Knowledge Base:
244525  (http://support.microsoft.com/kb/244525/ ) How to run Eseutil on a computer without Exchange Server
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
You can also use the /t switch to set the name for the temp database and for a different location. For example, to create a Sample.edb on the root of drive D when you are running the eseutil command from drive C, run the following command:
C:\>eseutil /d /ispriv /td:\Sample.edb
0
 
LVL 6

Expert Comment

by:evanmcnally
Comment Utility
Exchange will never automatically shrink the file.  You are correct about the white space being reused later, as to why is grows again sooner than you think...the thing is email boxes to all tend to keep growing.

I would say compaction is not necessary, except that since you'll need 110% of the .mdb file size as free space to do a compaction, you may want to do it now rather than later--like if it grows more you will no longer have enough free space to compact.

If in fact the space is simply used and that's why the IS keeps growing, then you won't get back anything significant from a compaction, but it should not hurt anything to try

Have you considered looking at individual mailbox size?  Maybe go to your top users and make them delete/archive some things?  Every email server I have supported tends to have a pattern something like the top 10% of users are consuming 80% of the space.  You can get bad loads of space with better policing of usage.  Users hate this, but I usually explain to the big boss that they'll either need to spend however many thousands of dollars on a new server or else support you in having users clean up.  Once a dollar figure is put on the cost of not cleaning, the size starts to go down a lot!
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 1

Author Comment

by:robw24
Comment Utility
Akhater: Good idea regarding creating another database/store and moving the users. Not sure if I will do this but I will keep it in mind. Also thanks for the link on offline defrag.

JBond2010: Thanks for the details on the offline defrag.

evanmcnally: So you think that there is nothing wrong, it's just the whitespace getting re-used quickly? That is what I was thinkng but wasn't sure. It just seemed to get used quickly. I do have limits in place and if they go over they will not be able to send mail (can still receive). So it's not like they are going crazy with their mailbox sizes.  

I do not have enough space (110%) to do a compaction. Would need to be an offline defrag, but I am thinking now that I am probably fine without doing that.
0
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
You can use any disk for the temp database it can be a usb disk, the bad thing about offline defrag is that it takes time and all your users will be down during this time that's why it is much better to just create a new database and move users to it.


However defrag is not a requirement

0
 
LVL 1

Expert Comment

by:zerocool9669
Comment Utility
Yes, you will need to do an offline defrag of the mail stores one thing that i have found useful from a performance and maintenance stand point is to departmentalize your exchange stores like create a mail store for sales one for costumer service ect. this way you can take down one store at a time and run a defrage with out disturbing other people. this will also make the exchange environment perform a little quicker.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now