Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2007-09-25

To make sure that your mailbox databases and public folder databases continue to operate efficiently, we recommend that you perform daily maintenance at a time when there is little activity on the databases. Microsoft Exchange Server 2007 Mailbox servers automate the tasks based on the schedule that you specify. For more information about how to set the maintenance schedule for a mailbox database or a public folder database, see How to Set the Maintenance Schedule for a Database.

When the database maintenance process runs, the following maintenance tasks are performed. These tasks are listed in the order that they are performed:

Note:
These maintenance tasks run only if there is enough time in the schedule to complete the tasks. For example, if you schedule database maintenance to run for two hours every evening, only tasks that can be completed within two hours are performed. When the tasks are scheduled to run the next evening, the maintenance tasks begin where they left off.
  1. Purge mailbox database and public folder database indexes   During online maintenance, the index aging table is maintained, and each value is compared to the current time. If the index has expired, the index is removed. This task removes entries that are older than 40 days.

  2. Maintain tombstones   A tombstone is a deleted object that remains in temporary storage. After a preconfigured amount of time, the object is permanently deleted. Each public folder maintains a list of deleted e-mail messages for the public folder object. When an e-mail message is deleted from a public folder, an entry is made on the public folder object. If this folder is replicated, the change entry indicates that the message delete operation must be replicated. If a public folder is not replicated, it is necessary to clean up the tombstones.

  3. Clean up the deleted items dumpster   When a message is deleted from a client application, such as Microsoft Office Outlook 2007, a flag is set to indicate that the message was deleted. By default, the client application does not display messages on which this flag is set. To view these messages, you must use the deleted items dumpster functionality in the client application. If the deleted items dumpster is not enabled, deleted messages are removed from the folder when this cleanup process runs during the maintenance cycle. If deleted items dumpster functionality is enabled, only deleted messages that have exceeded the retention period are removed. This cleanup task also checks for folders that have exceeded the retention period and removes them as well. For more information about how to configure deleted item retention, see Configuring Deleted Mailbox and Deleted Item Retention.

  4. Remove public folders that have exceeded the expiry time   This task removes public folders and system messages that have exceeded the expiry time. For more information about how to configure the public folder expiry, see How to View or Configure the Settings of Public Folders.

    Note:
    Public folder expiration policies apply only to the local replica of the public folder. Expired messages do not replicate their expired status to other replicas. Therefore, it is possible to have different expiration policies per replica.
  5. Remove deleted public folders that have exceeded the tombstone lifetime   This task removes deleted public folders that have exceeded the tombstone lifetime, which is 180 days.

  6. Clean up conflicting public folder messages   If two users modify the same message in a public folder, the resulting saved messages are in conflict. This can happen when a simultaneous save occurs on two Mailbox servers that contain replicas of the public folder. If the owners of the public folder do not resolve this conflict within the 180 day limit, this task retains the version of the message that was last saved and deletes all other versions.

  7. Update server versions   This task updates the version information as necessary for any public folder databases that contain a replica of a system folder.

  8. Check Schedule+ Free Busy and Offline Address Book folders   In this task, the public folder database verifies that the Schedule+ Free Busy and Offline Address Book folders exist as appropriate. Each administrative group and offline address book (OAB) has an assigned public folder database that is responsible for creating and maintaining the associated Schedule+ Free Busy and Offline Address Book folders. This public folder database makes sure that the folders exist and that there are no duplicates. When OABs are deleted from the Active Directory directory service, the associated OAB public folder is deleted approximately one week later. The Schedule+ Free Busy folders that are associated with administrative groups are never deleted.

  9. Clean up deleted mailboxes   This task checks the mailbox database for mailboxes that do not contain Active Directory objects. After 30 days, these mailboxes are deleted.

  10. Check message table for orphaned messages   This task checks the message table for a specific database and searches for messages that have a reference count of zero, which indicates that no folder in the database has a reference to the message. Orphaned messages are deleted.

  11. Clean up reliable event tables   Each logical database operation, such as message creation or deletion, is logged in a reliable event table. It is important that this reliable event table is regularly cleaned so it does not become unmanageable. This task removes events from the reliable event table that are older than one week. The reliable event table exists for subscribers, such as the Edge Transport server, to determine if there is an additional operation that the subscriber should perform. For more information about the Edge Transport server subscription, see Understanding Edge Subscriptions.

If one of the preceding maintenance tasks is performed, the database on which the task was run performs an online defragmentation. To learn about monitoring online defragmentation, see How to Monitor Online Defragmentation.

When all the preceding maintenance tasks have finished, the database on which the tasks were run performs the following tasks:

For More Information

To learn more about public folders, see Understanding Public Folders.

For more information about using the Exchange Management Shell, see Using the Exchange Management Shell.

For more information about managing public folders, see Managing Public Folders.

For more information about managing databases, see Managing Storage Groups and Databases.