Home > Microsoft Exchange Tips > Exchange Server Administration Tips > Optimize Exchange Server 2003 database maintenance
Exchange Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

EXCHANGE SERVER ADMINISTRATION TIPS

Optimize Exchange Server 2003 database maintenance


Brien M. Posey
05.17.2006
Rating: -4.56- (out of 5)


Exchange Server tips, tutorials and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


VIEW MEMBER FEEDACK TO THIS TIP

Exchange Server 2003 automatically performs regular database maintenance at the store level by default, but you should still manually examine your Exchange server's database maintenance schedule to make sure you're achieving optimal results.

There are 11 different tasks performed as a part of the maintenance -- some apply only to Exchange mailbox stores; others apply only to Exchange public folder stores:

  1. Purge the indexes on the mailbox and public folder stores.
  2. Perform tombstone maintenance on mailboxes and public folders.
  3. Remove expired messages from the dumpster for the mailbox and public folder stores.
  4. Remove expired messages from public folders.
  5. Remove deleted public folders with tombstones over 180 days old.
  6. Clean up message conflicts within public folders.
  7. Update server version information on public folders.
  8. Check for and remove duplicate site folders on public folder stores.
  9. Clean up deleted mailboxes on mailbox stores.
  10. Check the message table for orphaned messages (messages with a reference count of 0).
  11. Perform an online defragmentation of the store.

When maintenance is run on an Exchange Server store, it starts with the first of the 10 abovementioned tasks, and completes as many as possible within the allotted amount of time. If the Exchange database maintenance period expires before all applicable tasks have completed, the Exchange server will pick up at where it left off in the task rotation the next evening.

As long as at least one of the first 10 tasks has completed, Exchange Server will spend the last 15 minutes of its database maintenance cycle running an online defragmentation. By default, the online defragmentation will continue for an hour after the maintenance cycle has ended.

Adjusting the Exchange Server database maintenance cycle

Even though the Exchange database maintenance cycle is completely automated, there are some manual things you can do to make sure that it runs optimally. As I mentioned earlier, each store runs its own independent maintenance cycle.

To adjust the maintenance cycle for an Exchange Server store:

  1. Open Exchange System Manager, right click on the store you want to adjust, and select Properties.

  2. Navigate to the Database tab, where you can adjust the store's maintenance schedule through the Maintenance Interval dropdown list.

Since the maintenance cycle can be very resource intensive, schedule the maintenance cycle to occur when most of your users are not using the server. By default, maintenance runs from midnight to 4 a.m. This should be fine for most companies -- but you should also consider your backup schedule. Backing up an Exchange database doesn't preempt the tasks performed by the store, but it will cause the online defragmentation to be suspended until the backup is complete.

Also, if your server has multiple Exchange Server stores, you should configure the database maintenance interval to run at a different time for each store (this may not be possible for servers with a large number of stores). For example, you might run the Exchange database maintenance cycle on one store from 1 a.m. to 2 a.m., and perform maintenance on another store from 2 a.m. to 3 a.m.

Controlling online defragmentation intervals

Out of the 11 standard Exchange Server database maintenance tasks, one is more important than the rest -- online defragmentation. An online defragmentation frees space in the Exchange database by compacting database records into the fewest number of database pages possible. Keep in mind that an online defragmentation does not change the physical size of the database though; it simply frees up space within it.

There are a couple of registry keys you can use to control the behavior of the online defragmentation portion of Exchange Server's database maintenance cycle. (As always, keep in mind that editing the registry can be dangerous, so perform a full system backup before trying this technique.)

As I mentioned earlier, online defragmentation runs for 15 minutes at the end of the database maintenance cycle (assuming that a task has completed) and for another hour after that.

The registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\servername\Private-GUID (or Public-GUID for public folder stores) can be used to control the amount of time that is used at the end of the maintenance cycle for online defragmentation.

Simply create a REG_DWORD key named OLD Minimum RunTime (this key is case sensitive), and assign it a value that reflects the number of minutes that you want online defragmentation to run as a part of the maintenance cycle.

You can also control the amount of time that the online defragmentation process runs after the maintenance cycle completes. To do so, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\servername\Private-GUID (or Public-GUID for public folder stores) and create a REG_DWORD key named OLD Completion Time (again, this is case sensitive).

Assign this key a value that reflects the number of seconds for which the online defragmentation process should run. For example, a value of 3600 would cause the process to run for 3,600 seconds (i.e., one hour).

In most cases, you probably won't have to make any adjustments to the registry keys, but I do recommend making sure that the database maintenance interval settings for each store are optimal for your particular server.

About the author: Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Exchange Server, and has previously received Microsoft's MVP award for Windows Server and Internet Information Server (IIS). Brien has served as CIO for a nationwide chain of hospitals and was once responsible for the Department of Information Management at Fort Knox. As a freelance technical writer, Brien has written for Microsoft, TechTarget, CNET, ZDNet, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at www.brienposey.com.


MEMBER FEEDBACK TO THIS TIP

Thanks for this fantastic article! It has helped me immensely as a newbie Exchange admin.
—Carol N.

Do you have comments on this tip? Let us know.

Related information from SearchExchange.com:

  • Tip: Is an offline Exchange defragmentation really worth it?
  • Tip: Using an external hard drive to defragment Exchange Server
  • Reference Center: Exchange information store tips
  • Reference Center: Exchange Server database management tips

    Please let others know how useful this tip is via the rating scale below. Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to SearchExchange.com. If we publish it, we'll send you a nifty thank-you gift.

    Rate this Tip
    To rate tips, you must be a member of SearchExchange.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


    RELATED CONTENT
    Exchange Server Administration Tips
    Migrating .PST files to an Exchange Server information store
    Virtualizing Exchange Server 2007 with Microsoft's Hyper-V
    Configure SMTP connection limits in Exchange Server 2003 and SBS
    Five Microsoft Exchange Server backup worst practices
    How to export Global Address List data to Microsoft Office Access
    Create a group policy to prevent .PST file storage in Exchange 2007
    Synchronizing the Windows Mobile emulator with Exchange Server 2007
    Considerations for virtualizing an Exchange Server environment
    Why are .PST files a security threat to Exchange Server mailboxes?
    EMS add-on tool generates graphical Exchange Server 2007 reports

    Microsoft Exchange Server 2003
    Configure SMTP connection limits in Exchange Server 2003 and SBS
    Setting up email disclaimers and signatures in Exchange Server
    Repairing damaged OWA virtual directories in Exchange Server 2003
    Configure a mobile device to receive POP3 email from Exchange Server
    Customizing an Outlook Web Access 2003 email signature
    Why Exchange ActiveSync fails with NAT firewalls
    Is it time to upgrade users' Windows Mobile devices?
    Top 10 Microsoft Exchange Server 2003 registry hacks
    Use Performance Monitor to detect Exchange 2003 message queue problems
    How to set up email disclaimers on a single, back-end Exchange server
    Microsoft Exchange Server 2003 Research

    Microsoft Exchange Server Database Management
    Why boot an Exchange server from a storage area network (SAN)?
    DetachPipe: Outlook add-in tool saves and restores email attachments
    How to calculate white space in an Exchange streaming (.STM) file
    An affordable Exchange Server database backup software option for SMBs
    Solve server problems with the Exchange Troubleshooting Assistant tool
    iSCSI SAN storage for Microsoft Exchange -- 5 tips in 5 minutes
    Is an Exchange 2003 offline defrag needed prior to moving databases?
    How to move Exchange Server email folders to another disk on the same computer
    Should you use NTFS compression on Exchange Server files?
    Tame your Exchange Server transaction logs

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

  • HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts