-->

Friday, June 3, 2016

Sponsored Post: Mounting an Exchange 2013 Database After Repair

Mounting an Exchange 2013 database after repair

If you find yourself in a scenario where, for whatever reason, your Exchange database has been corrupted it is imperative that are able to quickly recover the information that you are in danger of losing. Before any action can be taken, you need to know exactly what’s wrong with the database to begin with. There are native methods using Microsoft’s own tools that will help you get to the route of the problem and make the file mountable again. In this article we will break down the steps you need to take in order to mount an Exchange 2013 database that has been corrupted.

Step 1
We will be using the eseutil.exe tool to do a consistency check of the damaged database, followed by trying both soft and hard recoveries and finally defragment and rebuild the database to make it mountable again.

The first step is a consistency check to find out the state of the database. In the Exchange Server open an elevated command prompt, then cd to the directory where database is located and run the following command:

eseutil /mh "database name"

For example, if the database’s name is database.edb, the command will look like this:

eseutil /mh database.edb

If done correctly, this will return information about the database which will include details about its current “State.” If the “State” reads “Dirty shutdown,” the database is in need of a repair.

Step 2

In the case of a repair being needed, the next step will be to try a soft recovery of the database by playing transaction log files into it.

For this you will need the prefix of the log file that you want to replay in the database. If we assume that the prefix is “E03,” then the command would be:

eseutil /r “E03”

This command should be run from the folder where log files are stored. To check if the soft recovery has succeeded, run the “eseutil /mh database.edb” command again.

Step 3

If the soft recovery did not work for you, and the database file is still in the dirty shutdown state, you will have to try a hard recovery using the “eseutil /p command.” The full syntax of the command is:

eseutil /p database.edb  

However, running the above command will replace the corrupt pages in the database with blank pages, which will cause data loss. The database will subsequently require rebuilding by de-fragmentation, which will shrink the physical size of the database on the disk without any further data loss.

The following is the command to defrag the database:

eseutil /d database.edb
Step 4

This command will disrupt the indexing of the database and you will have to run the “New-MailboxRepairRequest” command (introduced in Exchange Server 2010) to fix the problems. For the database that we are working with (database.edb), the instruction will look like this:

New-MailboxRepairRequest -Database “database.edb” -CorruptionType ProvisionedFolder, SearchFolder, AggregateCounts, Folderview

To see the results you will need to run the “Get-MailboxRepairRequest” cmdlet. This will give you information about the completion of the job. To check whether the problem has been solved and see if the database is in clean shutdown state, you will have to run “eseutil /mh database.edb” again.

Conclusion:

Using these native tools, it is possible to ensure that your Exchange database is in clean shutdown state and is mountable. However, the sequence of steps isn’t particularly user friendly and can lead to loss of data. For those that prefer a GUI based approach there are third-party solutions available on the market that simplify Exchange database repair. Lepide Exchange Recovery Manager is one such solution – allowing you to recover mailbox data from corrupt Exchange databases of all versions (including Exchange Server 2013 and 2016).
 
Disclaimer: This post is sponsored by Lepide Software. Although this post is sponsored, I fully stand behind and use Lepide products

17 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete
  6. This comment has been removed by a blog administrator.

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. This comment has been removed by a blog administrator.

    ReplyDelete
  9. This comment has been removed by a blog administrator.

    ReplyDelete
  10. This comment has been removed by a blog administrator.

    ReplyDelete
  11. This comment has been removed by a blog administrator.

    ReplyDelete
  12. This comment has been removed by a blog administrator.

    ReplyDelete
  13. This comment has been removed by a blog administrator.

    ReplyDelete
  14. This comment has been removed by a blog administrator.

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. This comment has been removed by a blog administrator.

    ReplyDelete
  17. This comment has been removed by a blog administrator.

    ReplyDelete