Ruby Nahal, Engineer By Ruby Nahal, Senior Engineer

As tech admins, we have all dealt with the extreme fickleness of Exchange servers for database integrity at some point in our careers. Whether it is a good old dirty shutdown of Exchange services or storage block corruption, Exchange can be left in an inconsistent state ranging in symptoms from inaccessible mailboxes to complete database unmounted condition. Since email is the core communication path for most businesses, downtime can lead to the loss of money and time.

So, what are the options to bring Exchange back to a stable condition? The answer lies in the extent of the problem.

Mailbox-Related Repair

In this scenario, only a few number of users are affected. Most often the problems are noticed when users cannot access Outlook web access or cannot open certain folders or items. Depending on the extent of corruption, you may start getting bounce backs from the corrupted mailboxes.

A very easy way to remedy this situation is to move the mailbox to another database if one exists. But sometimes even this may fail because of corruption. Exchange offers a PowerShell command (New-MailboxRepairRequest cmdlet – more info can be found here)  to repair different types of corruptions including search folder corruptions, aggregate counts on folders that aren’t reflecting correct values, views on folders that aren’t returning the correct content and provisioned folders that are incorrectly pointing to parent folders that aren’t provisioned.

Database-Related Repair

If the database is in a corrupted state, the most important goal is to get the database to a state where you can move all mailboxes off it. Hopefully, you will be able to move all mailboxes (or at least the ones that can be moved) from the corrupted database to another database. This will ensure minimal downtime or isolated downtime only for a number of mailboxes instead of all of them.

To repair the Exchange database, the database must be in an offline (unmounted) state. This means that the mailboxes present on the database will be inaccessible for the time the repair is running. The duration of the repair depends on the size of the database – it can last several hours. So, it is very important to be mindful that an extended maintenance window will be required.

Use Exchange Server Database Utility (ESEUTIL) for checking and running the repair on Exchange databases. Microsoft offers a comprehensive guide on different modes for repair for ESEUTIL here.

After completing the database repair, keep in mind these two best practices.

  1. Move off the mailboxes from the database to another database and decommission it as soon as possible.
  2. Do not allow the database to grow beyond a size that you believe is not easily recoverable in your environment.

Hopefully, Microsoft will come up with a way to perform these repairs in online mode to minimize the maintenance window in the future. But until then, these tips ought to help you keep Exchange up and running smoothly.

About Ruby //@RubyNahal // Ruby hails from India with a flair for cooking traditional cuisine and a deep love of learning (you may find her buried in a book, non-fiction of course) and a real passion for all things tech. For her, enhancing people’s lives via well-executed technology solutions has always been more than a job, and it also makes Ruby a perfect fit for our team; she gets our mission to the core. As far as technical chops, Ruby is bar none. She holds a Master’s Degree in IT, multiple certifications and awards in Network and Security Administration, led several R & D teams and worked for five years as an Infrastructure Architect in Canada. Need we say more?