Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


September 25, 2006

Tricks and Tweaks for Maintaining Exchange Databases

RSS
Subscribe to Windows IT Pro | See More Registry Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Exchange Server databases require regularly scheduled maintenance to keep them functioning at peak performance. This maintenance includes tasks such as getting rid of deleted mailboxes, cleaning up public folders, and defragmenting the database. Exchange Server 2003 performs these and other maintenance tasks automatically. Even so, it's important to have a good understanding of how this automated maintenance process works so that you can have more control over when and how the server carries out these tasks to optimize the process for your environment.

Exchange Server Maintenance Tasks
Exchange 2003 performs 11 tasks as part of its automated database maintenance schedule. Those tasks are:

  1. Clearing the indexes on the mailbox and public folder stores.
  2. Performing tombstone maintenance on mailboxes and public folders.
  3. Removing expired messages from the dumpster for the mailbox and public folder stores.
  4. Removing expired messages from public folders.
  5. Removing deleted public folders with tombstones more than 180 days old.
  6. Resolving message conflicts within public folders.
  7. Updating server-version information on public folders.
  8. Checking for and removing duplicate site folders on public folder stores.
  9. Removing deleted mailboxes on mailbox stores.
  10. Checking the message table for orphaned messages (messages with a reference count of 0).
  11. Performing an online defragmentation of the Exchange Information Store (IS).

As you can imagine, performing all 11 tasks against an Exchange store can take quite a while, depending on the size of the database and the condition that the database is in at the beginning of the maintenance cycle. The problem is that Exchange must perform the maintenance tasks while causing the least possible impact on users. In most cases, this means performing the maintenance tasks at night, and doing so in a way that doesn't interfere with the nightly backup. This usually doesn't leave a lot of free time for IS maintenance.

Because time limitations might prevent all the maintenance tasks from running on a nightly basis, Exchange performs the tasks in a prioritized manner according to which tasks have run most recently and which tasks are most important. Fortunately, the priorities are simple. The first 10 tasks on the list have equal priorities. However, the 11th task (performing an online defragmentation of the IS) is considered more important than the other 10 tasks.

The first time that the Exchange maintenance cycle runs, it begins with the first task on the list and works through as many of the other tasks, in the order listed, as time allows. If the maintenance period reaches the point where only 15 minutes remain and not all the tasks have been completed, then Exchange must make a decision. If Exchange has spent the entire maintenance period on one task, and that task hasn't finished running, then Exchange will continue to spend the remainder of the maintenance period on that task. However, if at least one task has finished, Exchange makes note of that last completed task, aborts the current maintenance task, and begins an online defragmentation. Because Exchange considers an online defragmentation to be more important than the other maintenance tasks, it allows the defragmentation to run for as long as an hour after the maintenance period has expired.

The next time that Exchange encounters a scheduled maintenance period, it checks to see which task was the last one to successfully finish (not counting the online defragmentation). Exchange then launches the next task on the list. By not restarting at the beginning of the task list each night, Exchange is able to guarantee that each maintenance task runs occasionally.

Adjusting the Maintenance Period
Before I show you how to modify the maintenance schedule for your stores, you need to know two things. First, maintenance is performed at the IS level. This means that if your Exchange implementation contains multiple stores, you'll need to schedule maintenance independently for each store. Second, IS maintenance is very resource intensive. It consumes a lot of disk space and CPU time. You need to take this into account when scheduling maintenance. If the maintenance cycle were to run during the nightly backup, the maintenance cycle and the backup would both be competing for disk resources, greatly slowing both processes.

You probably have a good idea of when the periods of peak activity are for your server and when the backup starts and finishes each night. Ideally, you'll want to schedule maintenance around these times. For example, if you know that your users start logging on around 7:30 A.M. and that almost everybody has gone home by 6:00 P.M., and your backup is set to run at 11:00 P.M., then you could schedule maintenance to run from 6:30 to 10:30 each night.

As you plan your maintenance schedule, keep in mind what I said about maintenance being resource intensive and that it's performed at the IS level. If your Exchange Server has multiple stores, you should configure the maintenance to occur at different times for each store, although this isn't always practical if your server has a large number of stores.

   Previous  [1]  2  3  4  Next 


Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Related Articles 10 Tips to Keep Your Microsoft Exchange Server Humming

10 Tips to Keep Your Microsoft Exchange Server Humming

Exchange Server and Outlook Whitepapers Take Control of Your Email: Understand the Business Reasons for Email Storage Management

Continuous Data Protection and Recovery for Microsoft Exchange

Related Events WinConnections and Microsoft® Exchange Connections

Bail Out Your Exchange Environment

Check out our list of Free Email Newsletters!

Exchange Server and Outlook eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

The Expert's Guide for Exchange 2003: Preparing for, Moving to, and Supporting Exchange Server 2003

Related Exchange Server and Outlook Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format

Exchange & Outlook UPDATE eNewsletter
News, strategies, products, and developments in Exchange Server and Outlook messaging.

Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement