Defragmeting Exchange databases on an attached drive

Posted on 2007-08-10
Last Modified: 2013-11-05
I am using Exchange Server 2003 running on a Windows Server 2003 SP2.
I need to defragment my exhange databases offline.
I do not have enough local storage so I am attaching a USB hard drive to my server.
I have called the drive F:
Am I correct in saying that the command I use is
C:\Program Files\Exchsrvr\bin>eseutil /d "c:\program files\exchsrvr\mdbdata\priv1.edb" /tF:\tempdfrg.edb

do I need to add in the switch t and the temporary edb file as per above?
Question by:fsaiexpert
    LVL 12

    Expert Comment

    by:Imtiaz Hasham
    If you don't hadd the /t, it will create it's own temp file

    Why do you want to defrag the store anyway? Is it because it's too large or is it because you are moving the database
    LVL 6

    Expert Comment

    LVL 6

    Expert Comment

    LVL 35

    Expert Comment

    LVL 6

    Expert Comment

    this one is good when you plan to use an external hard drive to defragment and Exchange db,289483,sid43_gci1089442,00.html

    Author Comment

    I need the database compacted - it is getting too large and we have not done offline defrag in over 1 year.  Also we have added alot of new users to our exchange database
    I have seen all these articles but none seem to give an example or indicate the command or switch when you attach a new drive?
    LVL 6

    Accepted Solution

    Well this article does -
    I've taken some extracts from it,.

    eseutil /d /p "c:\program files\exchsrvr\mdbdata\mailbox store.edb" /t"d:\tempdfg.edb"
    Option Description
    /b Database Make a backup copy under the specified name  
    /tDatabase Set the temporary database name (the default is Tempdfrg.edb)
    /sFile Set the streaming file name (the default is NONE)
    /fFile Set the temporary streaming file name (the default is Tempdfrg.stm)  
    /p reserve the temporary database (in other words, do not instate)  
    P/o Suppress logo
    /i Do not defragment streaming file

    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
    Note If instating is disabled, the original database is preserved uncompacted, and the temporary database contains the defragmented version of the database. For example, instating is disabled when you use the /p option.
    LVL 104

    Expert Comment

    The fact that you haven't done an offline defrag for a year doesn't mean a thing.
    I haven't done an offline defrag on some servers since they were built two or three years ago.
    Offline defrag should not be seen as something that you should do, or need to do on a regular basis.

    Look at event ID 1221 in the event viewer overnight. That will show you how much space you are likely to get back. Unless it is a significant amount then an offline defrag is not worth it.

    Finally an external USB drive is not going to be fast enough to do an offline defrag.
    You haven't said how large the database is, but the process goes along at between 1 and 4gb per hour. Are you ready for that kind of downtime?


    Author Comment

    Sembee - I accept your point.
    however I have recently created new mailbox store and moved mailboxes around for reduncnadancy and speed of recovery issues.  I noticed a slow degredation in the spped of Outlook so figured the defrag was the best way to go.
    After the defrag not only did I gain another 4GB in space back but the client performace in Outlook has increased dramatically.  As the stores are on a SAN the defrag took about 1 hour per 8GB.  
    Finally the switch i used was:
    1: Dismount Mailbox Store in Exchange System Manager

    2: cd program files\exchsrvr\bin

    3: eseutil /d "d:\Notebook Mailbox Store.edb" /t"d:\tempdfrg.edb"

    --where d is the new drive attached

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
    Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
    In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
    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…

    737 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

    19 Experts available now in Live!

    Get 1:1 Help Now