Exchange Offline Defragmentation

Posted on 2012-09-20
Last Modified: 2012-09-25
I have a problem with offline defrag,
My database file size is per event id 1221 we found 47 GB white space but to perform offline defrag we need  110% free space on disk. Now the question is what we have to conceder database size that means 110% of 84GB or 110% of (84 - 47 = 37) GB. Someone help me on this……….
Question by:RamRaz
    LVL 18

    Expert Comment

    by:Sushil Sonawane
    You required approximately double free space 160 GB.  When defragmentation running that time exchange create a temp database on the server.

    When Eseutil defragments a database by eliminating unused storage and compacting the database, Eseutil actually creates a new database that contains all the information from the original database. When defragmentation is complete, the original database is deleted or saved to a user-specified location, and the new version is copied over the original. If the utility encounters a serious logical problem in the database, defragmentation stops. The database must then first be repaired with Eseutil /P before it can be defragmented.

    When an offline defragmentation is performed, Exchange makes temporary copies of the database file (.edb file) and the streaming database file (.stm file). Tables from the .edb file are preserved and copied into the temporary database, but empty pages and indexes are discarded. Because this causes physical page numbers in the database to be changed, pages are not copied unaltered; the page links between them are all updated, and all pages left in the database undergo integrity checks. All pages in the .stm file that has information on them are preserved in the temporary .stm file, and references to the pages are updated in the .edb file.

    Please refer below link:


    Before going to defragmentation  Please take your exchange database backup.
    LVL 18

    Expert Comment

    by:Sushil Sonawane
    LVL 1

    Accepted Solution

    Hi RamRaz

    You require 110 % of total Database size.
    means 110% of 84GB of your Database.
    If you do not have another disk to do that, you can attach a external hard drive as well to do this.

    if you can elaborate your requirement and also the version of exchange you have this issue, I can think of some safe solution rather the simply defrag.

    Event id  1221 can tell you how much free space is available in your database. can help you with

    LVL 23

    Expert Comment

    by:Malli Boppe
    I wouldn't reommend you to do a offline defrag.
    The better option would be to create new database (provided you have space) and start moving the mailboxes.this way the downtime is minimal.
    LVL 17

    Expert Comment

    Mboppe is on point here in that moving the mailboxes to a new database depending on the version of exchange you are running will only impact the mailboxes being moved and can end up taking less space as well i.e.

    1. Turn on circular logging temporarily otherwise you will have some pretty massive log growth.

    2. Created database B and move all existing mailboxes from current DB to database B

    3. When down turn circular logging off

    4. Get a good backup of the new database you just moved everyone into.

    5. Dismount the original database

    6. Now delete the database file, or if you want to keep it around for safe keeping you can move to an alternate location OR just rename it for now

    7. No from Exchange Management tell it to Mount that database that you just deleted/moved/renamed and Exchange will squawk that the DB files are missing and if you continue it will create a new DB file. Say yes and you now have a new clean dial tone DB ready take on new mailboxes.

    Once you clean up the old DB files you are done.

    Featured Post

    Promote certifications in your email signature

    Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

    Join & Write a Comment

    We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
    Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
    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 video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

    755 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

    20 Experts available now in Live!

    Get 1:1 Help Now