Email Repair

Exchange Database Maintenance – A Step-by-Step Guide

A healthy Exchange Server doesn’t run on its own. Although you have an impeccable installation, with perfect configuration and setup, you still need to periodically do maintenance and constant monitoring of your Exchange Server and databases.

There is not a better feeling than that when everything works in top shape in your infrastructure. The admins, along with support, network, and monitoring teams, work to maintain a healthy environment. One of the responsibilities of an Exchange Administrator is to always keep the Exchange Services running, with the right resources in CPU, RAM, and storage performance. This is done by monitoring the resources all the time, by using the performance monitoring, to see the usage, and then upgrading the resources accordingly.

Another thing to monitor is the storage with regards to performance and Input/Output, and its usage over day and night. Apart from that, it is important for the Exchange Server’s database health is to have free space. When monitoring the storage, you need to also monitor the growth of databases and predict when to add more storage. When you have enough free space in the mailbox databases’ drive, the server will be healthy. Though there is no standard size you need to leave for free space, but try to keep 1/3rd of the database size in free space. You also have to keep in mind that if the drive, where your databases are located, ends up with no space, you might end up with a corrupted database or log, apart from the users being unable to receive and send emails.

One common factor which is responsible for the sudden growth of the databases is the white space. This is the storage that is consumed during the normal operation and is not taken back by the system once data has been removed from the databases. This can be fixed during a maintenance window by running defragmentation of the databases if needed.

To verify how much free-space is there in the databases, use the PowerShell cmdlet Get-MailboxDatabase, as given below. It is useless to try to reclaim 1 MB from a database as you would have to perform several processes for nothing. Also, you would lose precious time during the maintenance window. I am saying this because for running a defragmentation process on a database, the database must be dismounted. It would be best to perform defrag on one database at a time.

Get-MailboxDatabase -Status | ft name, databasesize, availablenewmailboxspace -auto

get-mailboxdatabase status

If you see that a database, say for example of 250 MB size, has 118 MB available space, it would be ideal to run the defragmentation. To defragment a database, you need to use the
ESEUtil with the /d parameter, as given below.

Eseutil /d "DB3.edb" /t "temp_db3.edb"

eseutil defragment database

Now, before running defrag, it is imperative to have enough free space as it will create a new file. So, you will need to have free space + free space, which is equivalent to the real size of the database. Otherwise, you would end up with no space on the drive, with the possibility of database/s corruption.

Daily backups are important because they keep the admins sleep well at night knowing that there is a backup running against the actual servers and databases. Backups are also important because they will also commit and purge the Exchange databases’ transaction log files.

As mentioned earlier in this article, to ensure that the services are running well, you need to make sure that the data is healthy in the databases. There are several factors to keep a database healthy that include ample space, defragmentation processes, and healthy backups of the databases.

Another way to check the database is by using the ESEUtil with /mh parameter. Apart from giving a lot of information on the databases, this parameter will display the state of the database. If the state is in Clean Shutdown, it means all is working well. However, if it is in Dirty Shutdown, it indicates trouble, apart from the fact that the Exchange Server will not allow you to mount the database.

So, for a healthy Exchange Server and happy users, consider the following for upkeep of the databases:

  • Daily backups
  • 24/7 monitoring system on storage, CPU, and RAM
  • Regularly Update Operating System and Exchange
  • Defrag during Maintenance Window
  • Split the load into more than one database

Now, by following the above, you will try to keep the usual suspects away from damaging or corrupting the databases. However, you cannot protect the Exchange Servers from inevitable future issues that might arise, irrespective of how much you try to prevent them. For the unforeseeable circumstances that might damage your databases and corrupt the data, there is an application that will surely come in handy.

Stellar Repair for Exchange is a highly efficient and fast application that can open any format of Exchange Server database from 2007 till 2019, being healthy or not. You can export EDB data to PST and other formats. If you have a corrupted database in your Exchange Server, you can open the EDB file easily with Stellar Repair for Exchange and export it directly to a new Mailbox Exchange Database. Thus, in case of a disaster, you can shorten the recovery time, without any extra cost.

76% of people found this article helpful