Export (0) Print
Expand All
Expand Minimize

Exchange Store Maintenance

 

Topic Last Modified: 2007-04-03

By Jeremy Kelly

This article contains details about Microsoft® Exchange Server store maintenance tasks. If tasks apply to only some versions of Exchange, this is specified in the task.

Microsoft Exchange store maintenance is the term applied to a series of operations performed by the Microsoft Exchange Information Store service to ensure logical consistency in the databases. The operations ensure items no longer needed by the system are removed from the database. If a custom schedule has not been defined for the database in Exchange System Manager, a default scheduled period from 00:00 through 05:00 local time will be used.

Overall, there are 10 tasks performed by the Microsoft Exchange Information Store service during this period.

If the maintenance window ends before one of the 10 tasks is completed, the last task running is recorded. The last task will be allowed to run until completion, which could exceed the maintenance window. During the next maintenance window, the Microsoft Exchange Information Store service determines the last task in progress and restarts the process, essentially picking up where it left off on the next task.

The progress of the tasks can be monitored by adjusting the Event Logging Level to minimum for the Microsoft Exchange Information Store service. When set to minimum, the following events are logged:

Event Type:   Informational

Event Source: MSExchangeIS Public / Private

Event ID:     1208

Description:

Starting the IS Maintenance tasks.

 

Event Type:   Informational

Event Source: MSExchangeIS Public / Private

Event ID:     1210

Description:

The IS Maintenance task <subtask name> completed.

 

Event Type:   Informational

Event Source: MSExchangeIS Public / Private

Event ID:     1209

Description:

The IS Maintenance tasks completed.

An eleventh task, online defragmentation, is performed by Extensible Storage Engine (ESE). At the completion of the list of tasks, the Microsoft Exchange Information Store service initiates online defragmentation by calling ESE to start the defragmentation process. This process will start only after at least one of the 10 tasks has been successfully completed.

The progress of online defragmentation can be monitored by reviewing the application log without adjusting the Event Logging levels. When the Microsoft Exchange Information Store service initiates ESE online defragmentation for a database, the following is logged:

Event Type:   Informational

Event Source: ESE

Event ID:     700

Description:

%1 (%2) %3Online defragmentation is beginning a full pass on database '%4'.

If a full pass of online defragmentation completes within the maintenance window, the following is logged indicating completion:

Event Type:   Informational

Event Source: ESE

Event ID:     701

Description:

%1 (%2) %3Online defragmentation has completed a full pass on database '%4'.

If a pass of the online defragmentation was interrupted due to window expired or backup initiated, the following event is logged:

Event Type:   Informational

Event Source: ESE

Event ID:     704

Description:

%1 (%2) %3Online defragmentation of database '%4' was interrupted and terminated. The next time online defragmentation is started on this database, it will resume from the point of interruption.

If the previous online defragmentation cycle was interrupted before it completed a full pass of the database, the following is logged instead of the previously described event:

Event Source: ESE

Event ID:     702

Description:

%1 (%2) %3Online defragmentation is resuming its pass on database '%4'.

If a resumed pass of the database completes within the maintenance window, the following is logged:

Event Type:   Informational

Event Source: ESE

Event ID:     703

Description:

%1 (%2) %3Online defragmentation has completed the resumed pass on database '%4'.

An important note about Exchange store maintenance and online defragmentation is the large number of changes made to the database. To maintain recoverability of the database, each of the changes made by these tasks are also transacted in the transaction logs. Depending upon the number of changes made in the database during these tasks, a large number of log files can be generated during the maintenance windows.

Backup schedules should also be monitored so they do not overlap with the Exchange store maintenance schedule. Backup will not preempt the 10 initial tasks performed by the Microsoft Exchange Information Store service, therefore they will run simultaneously. However, when initiating a backup of a database, the online defragmentation process is suspended until the backup is completed.

A list of every action during online maintenance tasks and the possible configuration operations to control their behavior is described in the following sections.

The following sections describe the Exchange store maintenance tasks.

One of the benefits of ESE, previously known as JET, is its ability to dynamically create indexes when information is resorted or requested in a different sort order. Unchecked, the Exchange store database could have thousands of indexes on a table.

The Exchange store handles this situation by keeping track of indexes by assigning them an expiry time. Information about the index is added to an internal table referred to as the indexing aging table. During online maintenance, the index aging table is maintained, and each entry’s value of ptagIndexDeleteTime is compared to the current time. If the index has expired, the index is removed. This process runs every 24 hours and only during the Microsoft Exchange Information Store service maintenance cycle. It removes entries older than 8 days for Exchange Server version 5.5 and 40 days for Exchange Server 2003 and Exchange 2000 Server by default. A list of criteria follows:

  • Default Interval   Every 24 hours.
  • Default Criteria   Remove indexes older than 8 days on Exchange Server 5.5 and older than 40 days on Exchange Server 2003 and Exchange 2000 Server.
  • Configurable Settings   The following displays the configurable settings:
    DC=<Domain>
      CN=Configuration
        CN=Services
          CN=Microsoft Exchange
            CN=<ExchOrgName>
              CN=Administrative Groups
                CN=<site>
                  CN=Servers
                    CN=<servername>
                      CN=InformationStore
                        CN=<Storage Group>
                          CN=<Database>
  • Object Class   Database Object.
  • Attribute Name   msExchAgingKeepTime.
  • Description   The amount of time in seconds to keep unused indexes and views in the database. This value is applied to Exchange Server 2003 and Exchange 2000 Server and supersedes the following registry values:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem
  • Value Name   Aging Keep Time.
  • Radix   REG_DWORD.
  • Description   The amount of time in seconds to keep unused indexes and views in the database. This value is used by Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.
  • Value Name   Aging Clean Interval.
  • Radix   REG_DWORD.
  • Description   The interval in milliseconds at which the store attempts to purge unused indexes. This value is used by Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPublic

or

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPrivate

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Public-<Public Folder GUID>

or

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Private-<Public Folder GUID>

  • Value Name   Reset Views.
  • Radix   REG_DWORD.
  • Description   Setting this value to 1 will cause the store to remove all indexes regardless of age on the next cycle of Exchange store maintenance for the corresponding database. The value is then set back to 0. By setting this value, you may experience initial delays rebuilding previously cached views.

Each folder maintains a list of deleted messages for a folder in ptagMidsetDeleted on the folder object itself. When a message is deleted from a folder, an entry is made in ptagMidsetTombstones. If this folder is replicated, this gives an indication of the message delete operations that need to be propagated. When the propagation occurs, the entries are moved from ptagMidsetTombstones and merged into ptagMidsetDeleted. If a folder is not replicated, it is necessary to clean up this situation through the Exchange store maintenance cycle. This process runs every 24 hours and is not configurable.

When a message is deleted from a client, a flag, ptagMsgDeleted, is set to indicate the message is deleted. By default, a client will not display messages that have this flag set. To view these messages, you use the dumpster functionality in the client. If the dumpster is not enabled, messages that have been deleted will be removed from the folder when this process runs during the maintenance cycle. If dumpster functionality has been enabled, only messages that have been deleted and have exceeded the retention period will be removed during this maintenance routine.

This process also checks for folders that have exceeded the retention period and will remove them as well.

The following sections describe the configurable settings for Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPublic

or

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPrivate

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Public-<Public Folder GUID>

or

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Private-<Public Folder GUID>

  • Value Name   Deletion Thread Period.
  • Radix   REG_DWORD.
  • Description   The interval in seconds at which the store attempts to purge unused indexes. This value is used by Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

This is a maintenance process of traversing through all the messages in public folders and removing the ones that have exceeded the expiry time.

The following sections describe the configurable settings for Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPublic

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Public-<Public Folder GUID>

  • Value Name   Replication Expiry.
  • Radix   REG_DWORD.
  • Description   The interval in milliseconds at which the store removes items that have exceeded the retention period.

This maintenance process removes deleted public folders that have exceeded the tombstone lifetime, which is 180 days by default. When a public folder is deleted, it is saved for replication purposes. This allows for items that are deleted to be tracked during the replication process. This removes a maximum of 500 folders per 24 hour period.

The following sections describe the configurable settings for Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPublic

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Public-<Public Folder GUID>

  • Value Name   Replication Folder Tombstone Age Limit.
  • Radix   REG_DWORD.
  • Description   The interval in days to keep tombstones.

When two users have edited and modified the same message in a public folder, the resulting saved messages are defined as being in conflict. This can happen when a simultaneous save occurs on the same public folder server, or if the message is edited on two servers that contain replicas of the folder. If no action is taken by the owners of the public folder within Conflict Age Limit, this process takes the appropriate action based upon the property PR_RESOLVE_METHOD on the folder itself. The resolution method is defined in Exchange System Manager on the public folder object.

The following sections describe the configurable settings for Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPublic

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Public-<Public Folder GUID>

  • Value Name   Replication Folder Conflict Age Limit.
  • Radix   REG_DWORD.
  • Description   The interval in days that items in conflict are allowed to exist.

This process updates the version information as necessary for any public folder databases containing a replica of the system configuration folder. No configurable settings are available.

This process is only valid for Exchange Server 5.5. This process attempts to remove folders that have been secured in other sites and the site is no longer present in the directory. Each folder is examined, and for each secure folder where the home site is not visible in the directory, a timer is set to remove the folder. The default is seven days.

The following section describes the configurable settings for Exchange Server 5.5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPublic

  • Value Name   Secure Folder Aging Task Frequency.
  • Radix   REG_DWORD.
  • Description   The interval in days.

Every 1 hour a public database will check to ensure no duplicate site folders exists within an Administrative Group and removes them. No configurable settings are available for this process.

This process cycles through mailboxes that currently do not have directory service objects. After a default of 30 days, the mailboxes are deleted. This process runs every 24 hours and no interval adjustments are available.

The following sections describe the configurable settings for Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

DC=<Domain>

  CN=Configuration

    CN=Services

      CN=Microsoft Exchange

        CN=<ExchOrgName>

          CN=Administrative Groups

            CN=<site>

              CN=Servers

                CN=<servername>

                  CN=InformationStore

                    CN=<Storage Group>

                      CN=<Database>

  • Object Class   Database Object.
  • Attribute Name   msExchMailboxRententionPeriod.
  • Description   The amount of time in seconds to keep retained mailboxes without a corresponding directory object.

This process traverses the message table for a specific database and looks for messages that currently have a reference count of zero, indicating no folder currently has a reference to the message. Messages encountered are deleted. A maximum of 50,000 messages will be deleted in a cycle. This process runs every 24 hours, and no interval adjustment is available.

If at least one of the maintenance tasks was able to complete within the maintenance schedule, the Microsoft Exchange Information Store service requests that ESE begin an online defragmentation cycle. This process will run for at least 15 minutes at the end of the maintenance window. It is important to note that the online defragmentation process will suspend itself if a backup starts for any database in the storage group.

The intention for online defragmentation is to free up pages in the database by compacting records onto the fewest number of pages possible, thus reducing the amount of I/O necessary. The ESE database engine does this by taking the database metadata, which is the information in the database that describes tables in the database, and for each table, visiting each page in the table, and attempting to move records onto logically ordered pages. If you understand b-trees, you start at the furthest page to the right and begin compressing records to furthest page to the left. This does not necessarily mean the pages are in order, but the movement is from a logical perspective.

It is possible that this process does not complete before the time indicated by the Microsoft Exchange Information Store service. In such a case, the ESE engine stores the last table successfully processed. At the next occurrence of Online Defragmentation, ESE selects the next table in the metadata, and will resume processing tables until the maintenance window ends.. If online defragmentation can process all tables before the maintenance window ends, it will restart at the first table listed in the metadata and loop on all tables until the maintenance window ends. The changes made to the database are transacted. Therefore, a large number of delete operations, followed by an online defragmentation cycle, will generate a large number of transaction logs, because records are compressed into the fewest number pages.

However, if Exchange store maintenance is set to always, online defragmentation is also set to always, and online maintenance will continuously run.

The following sections describe the configurable settings for Exchange Server 2003, Exchange 2000 Server, and Exchange Server 5.5.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersPublic

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Public-<Public Folder GUID>

or

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\<ServerName>\Private-<Public Folder GUID>

  • Value Name   OLD Minimum RunTime.
  • Radix   REG_DWORD.
  • Description   The amount of time to run after completing at least one of the Exchange store maintenance tasks in minutes. Default value is 15 minutes.
  • Value Name   OLD Completion Time.
  • Radix   REG_DWORD.
  • Description   The amount of time in seconds beyond the maintenance window that online defragmentation will be allowed to run. Default value is 1 hour or 3,600 seconds.

For more information, see the following Exchange Server blog article:

For more information, see the following Microsoft Knowledge Base articles:

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft