Maintain Mailbox Databases

Applies to: Exchange Server 2010

You can use several tools to maintain your mailbox database. The following sections describe how to use these tools to ensure that your mailbox databases continue to operate efficiently. These tools help to reduce the administrative database maintenance tasks that you've had to perform in previous versions of Exchange.

Looking for other management tasks related to managing mailbox databases? Check out Managing Mailbox Databases.

Use performance counters to monitor online defragmentation

In Microsoft Exchange Server 2010, the following performance counters for monitoring the behavior of database defragmentation have been added for use with Performance Monitor:

  • MSExchange Database ==> Instances \ Defragmentation tasks   Shows the background database defragmentation tasks that are currently executing.
  • MSExchange Database ==> Defragmentation Tasks completed/Sec   Shows the number of background database defragmentation tasks completing execution per second.
  • MSExchange Database ==> Defragmentation Tasks Discarded   Shows the background database defragmentation tasks that couldn't be registered.
  • MSExchange Database ==> Defragmentation Tasks Pending   Shows the background database defragmentation tasks that are currently pending.
  • MSExchange Database ==> Instances \ Defragmentation Tasks Scheduled/Sec   Shows the background database defragmentation tasks scheduled for execution per second.

These are informational performance counters to show the performance of the database and aren't required to be part of the daily maintenance of your database.

You can also enable extended Extensible Storage Engine (ESE) performance counters to further help with the monitoring of your databases. For more information, see How to Enable Extended ESE Performance Counters.

Use the EMC to set the maintenance schedule for a database

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Mailbox databases" entry in the Mailbox Permissions topic.

You can use the EMC to set the maintenance schedule for a database or allow 24 x 7 database maintenance. We recommend that you perform daily maintenance at a time when there is little activity on the database. Online defragmentation no longer works like it did in Exchange Server 2007. In Exchange 2010, during the maintenance window, online defragmentation is continuously performed while the database is being read from and written to. For more information, see New Exchange Core Store Functionality.

  1. In the console tree, expand Organization Configuration, and then click Mailbox.
  2. In the result pane, click the Mailbox server on which the database resides.
  3. In the work pane, click the mailbox database for which you want to set the maintenance schedule.
  4. In the action pane, under the name of the database, click Properties. The <Database Name> Properties dialog box appears.
  5. On the Maintenance tab, enable background database maintenance (which enables 24 x 7 ESE scanning), select a predefined schedule or to create a customized schedule, click Customize.
    Enable 24x7 ESE database scanning
    Enable background database maintenance
  6. Click OK to save your changes.

Use the Shell to set the maintenance schedule for a database

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Mailbox databases" entry in the Mailbox Permissions topic.

This example uses the Set-MailboxDatabase cmdlet to set the database schedule for the mailbox database MailboxDatabase1 on Server01 to run between 02:00 and 03:00 on Sundays and Wednesdays.

Set-MailboxDatabase -Identity "Server01\MailboxDatabase1" -MaintenanceSchedule "Sun.2:00-Sun.3:00","Wed.2:00-Wed.3:00"

This example uses the Set-MailboxDatabase cmdlet to mount the database in 24 x 7 background check-summing mode.

Set-MailboxDatabase -BackgroundDatabaseMaintenance -Identity <dbname> $true

When set to $false, the database will be mounted without the 24 x 7 check-summing mode and will do the ESE checksum maintenance during the online maintenance period that you've selected.

For detailed syntax and parameter information, see Set-MailboxDatabase. For more information about database maintenance, see the "Database Maintenance" section in New Exchange Core Store Functionality.