Table of Content
    Exchange Server Recovery

    How to Solve Error “MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)”?


    Table of Content

      Summary: The “MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)" error appears when you try to mount a database which is corrupt or has inconsistent log files. This guide helps you fix this database mounting error and mount the database successfully. It also mentions an Exchange repair software that can repair the corrupt database within minimum time and efforts.

      In Exchange Server, databases are used to store mailboxes and their data, such as emails, attachments, calendars, etc. For users to access their mailboxes, the database must be mounted on the server. You can mount the Exchange database (EDB) on the server using Exchange Admin Center (EAC) or Exchange Management Shell (EMS). However, if the log files are missing or corrupt, you will be unable to mount the database on the server and receive an error, such as “MapiExceptionCallFailed: Unable to mount database”. The complete error message appears as follows:

      Failed to mount database 'Mailbox Database'.
      Mailbox Database
      Failed
      Error:
      Couldn't mount the database that you specified. Specified database: Mailbox Database; Error code: An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)
      [Database: Mailbox Database, Server: SERVER.rapidspillrespo.local].
      An Active Manager operation failed. Error: The database action failed. Error: Operation failed with message: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)
      [Database: Mailbox Database, Server: SERVER.rapidspillrespo.local]
      An Active Manager operation failed. Error: Operation failed with message: MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)
      [Server: SERVER.rapidspillrespo.local]
      MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)

      As corruption in database or log files is the primary reason behind this error, you need to do a few checks and repair the Exchange database to mount it.

      Steps to Fix Error “MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515)” 

      Below we have discussed the steps to fix this error and successfully mount the database (EDB).

      Note: Ensure that the user account that you are using to perform the process is assigned with the Database role or is a part of the Organization Management role group. Also, take a backup of the database. This will help you recover data in case something goes wrong.

      Step 1: Check the Database State

      The error appears when you try to mount the database that is in Dirty Shutdown state. A database is said to be in Dirty Shutdown state when the log files are either not committed to the database or missing.

      To check the database state, you can run the following command in PowerShell as an administrator:

      eseutil /mh "PATH TO EDB FILE\Database.EDB”
      check the database state

      In the command output, check the State field. It will show either Dirty Shutdown or Clean Shutdown. If it displays Clean Shutdown, you can mount the database. However, if the State field displays Dirty Shutdown, follow the next step.

      displays Dirty Shutdown

      Step 2: Perform Database Recovery (Soft Recovery)

      If the database is in Dirty Shutdown state, it is because the database is corrupted or some log files are not committed to the database. Use the following PowerShell command to perform the Soft Recovery process to commit any uncommitted log files to the database.

      eseutil /r E00 /l “C:\Path to log file” /d “C:\Path to database”

      This command will work only if the log files are available and in healthy state.

      After running this command, re-run the previous command to again check the state of the database. If state is still displayed as Dirty Shutdown, follow the next step.

      Step 3: Check Database Logs

      If the database is still in dirty shutdown state or fails to mount, check the database log files. For this, run the following command:

      eseutil /ml "PATH TO LOG FILE\Mailbox Database\E00"

      Note: E00 is the starting sequence of the logs.

      The output will display a list of log files. If the log files are clean, the status of log files should be shown as OK.

      Check Database Logs

      Step 4: Recover the Database (Hard Recovery)

      If the database logs are not OK, you can perform the Hard Recovery process on the database by using the following command:

      eseutil /r /l "PATH TO LOG FILES\E00" /d "PATH T eseutil /p <path_to_the_database>

      It is to be noted that the Hard Recovery process may cause data loss as it works by purging the data, which is deemed as corrupted. So, it is always suggested to perform Hard Recovery as a last option and take a backup of the database before performing this process. In addition, the database will be hard coded after this process and Microsoft will not provide any support after hard recovery.

      However, to avoid data loss altogether and restore all the data from corrupted database, you can use Stellar Repair for Exchange – a powerful Exchange repair tool. This tool can scan and restore data from corrupt Exchange database (EDB) file and save the data in PST and various other file formats, like MSG, EML, etc. It can also directly export the data from repaired EDB file to a live Exchange Server database or Office 365 with complete integrity. The tool supports Exchange Server 2019, 2016, 2013, and earlier versions. The software is an effective way to restore a database that fails to mount without the risk of data loss. It does not require log files to perform the repair and restore process.

      To recover the database with Stellar Repair for Exchange, follow this instructional guide on How to Recover the Corrupt/Inaccessible Exchange Mailboxes

      Step 5: Mount the Database on the Server

      Once the database is in Clean Shutdown state, you can mount it on the server using the following command:

      Mount-Database –Identity <dbname> –Confirm:$False

      Alternatively, you can use the Exchange Admin Center (EAC) to mount the database on the server.

      Mount the Database on the Server

      The database will mount on the server without the MapiExceptionCallFailed: Unable to mount database. (hr=0x80004005, ec=-515) error.

      Conclusion

      You may face the “MapiExceptionCallFailed: Unable to mount the database (hr=0x80004005, ec=-515)” error while mounting the database. This error indicates that the database you are trying to mount is corrupted. When the database is offline, it affects the email flow and business. Thus, it is critical to resolve this error and mount the database as quickly as possible. Follow the steps in this guide to resolve the error and mount the database on the server. Alternatively, you can also restore the database by using the Exchange recovery tool, like Stellar Repair for Exchange in case the database is severely corrupted.

      Was this article helpful?

      No NO

      About The Author

      Ravi Singh linkdin

      Ravi Singh is a Senior Writer at Stellar®. He is an expert Tech Explainer, IoT enthusiast, and a passionate nerd with over 7 years of experience in technical writing. He writes about Microsoft Exchange, Microsoft 365, Email Migration, Linux, Windows, Mac, DIY Tech, and Smart Home. Ravi spends most of his weekends working with IoT (DIY Smart Home) devices and playing Overwatch. He is also a solo traveler who loves hiking and exploring new trails.

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received