Exchange Offline Defragmentation

In this post I'll describe a few quick steps to complete a very lengthy and tiring process of Exchange Database Defragmentation and I mean Offline Defragmentation !!!




You should defrag your Exchange database offline to reduce the physical size of your Exchange database. We will perform offline defragmentation by using the ESE utility (ESEUTIL) while your mailbox stores and public folder stores are offline.

Note that the length of time that the defragmentation will take will depend on the amount of white space in the database, as well as the size of the transactions recorded in the database, and your hardware specifications.

Defragmentation requires free disk space equal to the size of the database (actually, you'll need 110% of free space).

Microsoft recommends a conservative 5 - 7 GB per hour for a defrag operation, which means that your server will be offline for as long as it takes, assuming no hardware failures will occur.

ESEUTIL: 

The Exchange Server Database Utilities (Eseutil.exe) is a tool that you can use to verify, modify, and repair an Exchange database file. When a database is corrupt or damaged, you can restore data from backup or repair it using Eseutil. Eseutil is a command-line tool that works with the Extensible Storage Engine (ESE), database files, and log files associated with a Microsoft Exchange database. Eseutil is located in the Exchange default install folder, which is <SystemDrive>:\Program Files\Microsoft\Exchange Server\Bin.


Note:
Streaming (.stm) files are not supported by Eseutil in Exchange 2007 databases. However, Eseutil supports .stm files in older Exchange databases.
If you are working with databases in versions of Exchange that precede Exchange 2007,
use the Eseutil tool that is associated with that version of the Exchange database.

Defragmentation Modes:

Eseutil /D Defragmentation Mode
Eseutil /P Repair Mode
Eseutil /C Restore Mode
Eseutil /R Recovery Mode
Eseutil /G Integrity Mode
Eseutil /M File Dump Mode
Eseutil /K Checksum Mode
Eseutil /Y Copy File Mode

Here, in this post we'll deal only with the Defragmentation Mode and its variations.


Use one or more of the following options to specify the operations that you want to perform on the database.
Option                                                    Description
-----------------------------------------------------------------------
/b <path>                        Makes a backup copy of the original uncompacted database
                                       at the specified location.

/p                                  Retains and preserves the original uncompacted database
                                     in its original location and stores the new compacted
                                    database in the default file Exchsrvr\Bin\Tempdfrg.edb.

/t <file_name>            Creates and renames the new compacted database in the
                                   specified path.

/o                                 Does not display the Microsoft Exchange Server banner.



Now, lets get down to the Mis-En-Place for Defragnmentation 



1. Check Eventviewer Logs for successful Backup (Make sure you backup your database before performing  a defrag)

2. Check Transaction Logs Deleted successfully from Eventviewer 

3. Check Antivirus Logs

4. Dismount Database that needs to be defragmented - SG1\TX-DB01

5. Check for Clean/Dirty Shutdown (/mh)
          Eseutil /mh N:\TX-DB01.edb



To Defrag, navigate to the "<SystemDrive>:\Program Files\Microsoft\Exchange Server\Bin" folder and type the command:

        eseutil /d N:\TX-DB01.edb /p

Using a /p switch saves you from the worries of database corruptions if any failures take place while defragmentation.

You should be able to see the temporary file for the defrag being created under the /Bin folder that contains eseutil.exe




After completion the screen should look like this:




In my case I was able to reduce a dastabase of 95GB to an unimaginable amount of 44GB.

6. Now you can replace the temp files with the existing .edb and .stm files and leave the rest files present there. Better to keep the old .edb and .stm for sometime as a RollBack Plan.

7. Mount the database and verify functionality

Note: 
After performing these activities I have noticed the reduction and the amount of time taken mainly depends on the size of the .stm file. A Bigger .stm filesize can take a longer defrag time and lesser reduction in size and vice versa.

Till Then
Keep Innovating



Reference Articles:
http://www.petri.co.il/defragment_exchange_2000_2003_server_databases.htm 
http://msexchangeguru.com/2009/07/12/exchange-database-recovery-using-eseutil-commands/
http://technet.microsoft.com/en-us/library/aa998249(v=exchg.80).aspx
http://support.microsoft.com/kb/192185


Comments

  1. Here is an Exchange server tool that worked in our case and we successfully repaired and rebuilt our damaged Exchange databases: http://www.recover-computerdata.com/exchange-server-recovery.html

    A free trial version is also available on its official website to check its performance !

    ReplyDelete
  2. Exchange server repair software is capable to repair corrupt exchange edb files and instantly convert corrupted edb files into usable outlook pst format. Here is software detail http://www.edb2pst.net/

    ReplyDelete
  3. Faster technology that really helpful to repair corrupt Priv1.EDB or Pub1.EDB files and fix EDB errors. It amazingly recover/convert all EDB file from damage exchange database and export Exchange mailbox to PST mailboxes including- Notes, Contacts, Calendars, Tasks, Journals, Inbox, Outbox, Sent items etc.

    Read more: http://www.filesrecoverytool.com/exchange-edb-recovery.html

    ReplyDelete
  4. Try a superb Exchange Server Recovery software can also recover EDB File into PST, EML, MSG, Text and HTML file format with convert all recovered Email items into outlook file with along email header, email properties or attachments too. For any information visit here : http://www.exchangeserver.pcrecoverytools.com/

    ReplyDelete
  5. Recover damaged Exchange server with the guidance of perfect Exchange mailbox recovery software. This is the best recovery solution to repair corrupt EDB file and convert EDB mailbox into Outlook PST file. EDB to PST conversion tool works on all EDB versions and successfully convert EDB to PST file.

    Read More

    http://exchangeexportedbtopst.blogspot.in/

    ReplyDelete
  6. Easy to recover corrupt, damaged MS Exchange Server databases (EDB) files, I would like to refer more effective software, you can use RecoveryFix for Exchange Server Recovery Tool. That software recover emails, attachments, contacts, calendars, tasks, etc. from corrupt EDB files. It can supported all update version of MS Exchange Server 2013 / 2010 / 2007 / 2003 / 2000 and 5.5. For more detail click here - http://www.edbtopstutility.net

    ReplyDelete
  7. Hello,

    Here is other option available at " http://www.recoverygadgets.com/edb-to-pst-converter.html " which can converts inaccessible exchange edb data to new outlook pst files format.

    ReplyDelete
  8. Use Exchange Server Recovery Software which gives the one of the preeminent feature to recover Exchange EDB damage issues and also provides the four different features to convert Exchange Server Data to Outlook PST/EML/MSG and HTML with all attachment/properties/junk mail/calendar/journal and body information etc. This application has message filtering process to extract some selective Emails from all file or folder into each format according to dates “from date” to “to date”.


    Read More Information So Visit Here :- http://www.enstella.com/edb-to-pst-conversion.html

    ReplyDelete
  9. Download InQuit EDB to PST converter for recovery of corrupted EDB file from exchange server database instantly without any data change. This software easily change whole data from EDB file into new readable PST files and other formats such as MSG, EML, vCard, vCal, MBOX and EMLX and save it in required location.
    Read more: http://www.inquitsoftware.com/en/pages/edb-to-pst-converter.html

    ReplyDelete
  10. EdbMails is a unique EDB to PST Exchange Server Recovery solution. It's an EDB to PST Conversion utility which facilitates granular / brick-level Exchange Server Recovery with EDB to PST Conversion. EDB to PST Converter repairs corrupt or damaged Exchange EDB files and restores the mailboxes into Outlook PST file. You can easily view Mailbox data from the PST files using MS Outlook application. It supports MS Exchange Server Recovery for 2003, 2007, 2010 and 2013 corrupt and unmounted database.

    also visit: OST to PST

    ReplyDelete

Post a Comment

Popular Posts