Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


September 25, 2006

Tricks and Tweaks for Maintaining Exchange Databases

RSS
View this exclusive article with VIP access -- click here to join |
See More Registry Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

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 


Reader Comments
indexes -> indices

wooway December 08, 2006 (Article Rating: )


Glad you're reading carefully! Both indexes and indices are accepted plural spellings for index. --Anne Grubb, editor, Exchange & Outlook Pro VIP

AnneG_editor January 10, 2007 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Microsoft: Save Money ... By Paying for Software

Microsoft this week adopted an interesting tactic in its long-running battle with open source software: Businesses looking to save money over the long haul should simply pay for software instead of moving to free, open source solutions. The rationale? ...

Command Prompt Tricks

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

Microsoft Delivers Service Pack 2 Beta 2 for Vista, Server 2008

Microsoft on Tuesday announced the availability of the Beta 2 version of Service Pack 2 (SP2) for Windows Vista and Windows Server 2008. Since both operating systems were developed from the same code base, they have a common servicing structure and thus ...


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 Protecting (You and) Your Data with Exchange Server 2007

StoreVault SnapManagers for Microsoft Exchange and SQL Server

Related Events Storage Consolidation for Your Microsoft Applications: Reducing Cost and Complexity

The Myths & Truths of Email Management with SharePoint

Top 10 Email Security Challenges and Solutions

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 Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

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 Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing