How to Resolve Unable to Mount Database (hr=0x80004005, ec=1032) Error

Summary: The error ‘Unable to Mount Database. (hr=0x80004005, ec=1032)’ is a database mounting error that appears in the Exchange Management Shell when the Mount-Database cmdlet fails to mount the database on the Exchange server. This may happen due to missing or deleted log files, permissions, corrupt database files, and storage-related issues. In this guide, we discussed a few workarounds to help you fix this error and restore the Exchange database mailboxes to resume connectivity and email flow.

An Exchange database containing user mailboxes may get dismounted or go offline due to various reasons. When database is offline, users can?t connect or access their mailboxes from the Exchange server. This disrupts the email flow and leads to a loss in productivity.

Usually, the database is dismounted due to missing log files, damage to the database file, or hardware issues leading to system crash, unexpected shutdown, etc.

However, if the database mount is failing with an error message ? Unable to Mount Database. (hr=0x80004005, ec=1032) ? you can follow the solutions discussed below.

Solutions to Fix Unable to Mount Database. (hr=0x80004005, ec=1032)

If the database fails to mount for any reason and displays, ?Unable to Mount Database. (hr=0x80004005, ec=1032)? error message, you can add parameter -AcceptDataLoss parameter with Mount-Database cmdlet.

Mount-Database -Identity ExchangeServer1.Contoso.com\MyDatabase -AcceptDataLoss

The parameter specifies that you accept some data loss in order to mount the database without confirmation. In this case, uncommitted mail items and mailboxes are skipped. Obviously, using this parameter can lead to data loss as it removes items and changes that are not yet committed to the database from log files.

If you want to mount or restore the database with all mailboxes and mail items, including the damaged ones, and avoid Unable To Mount Database. (hr=0x80004005, ec=1032) error, you must use an Exchange recovery software, such as Stellar Repair for Exchange.

The software repairs the damaged Exchange database files recover deleted mailboxes and restore all the mailboxes to the live Exchange account. You can export these mailboxes to a new or existing healthy database on your Exchange server and resume mailbox connectivity.

There are manual ways and workarounds also to fix the ?Unable to Mount Database. (hr=0x80004005, ec=1032)? error but they require additional permission, time, and effort. Besides, there?s no guarantee that these workarounds will work.

Some manual methods discussed below may also lead to data loss. Thus, create a backup copy of the affected database before proceeding any further.

1. Check Permissions

Before mounting the database, you must assign the required permissions and roles to the user account that you are using to mount the database in Exchange Server.

To mount the database, the user must be assigned the Databases role.

The roles allow administrators or assigned users to create, manage, mount, or dismount the databases on Exchange servers.

To assign the permission, run the following command in the Exchange Management Shell (EMS).

New-ManagementRoleAssignment ?Role ?Databases" ?User <Username>

For instance,

New-ManagementRoleAssignment ?Role "Databases" ?User ravi

You may also use Exchange Admin Center to assign the roles.

Once the roles are assigned, use the Mount-Database cmdlet in EMS or Exchange Admin center to mount the database.

2. Check Database Status

It?s also important to check the current status of the database before mounting. If Exchange database is in a Dirty Shutdown state, it can?t be mounted. The database mount will fail with the error message: Unable to Mount Database. (hr=0x80004005, ec=1032).

To mount a database in Exchange Server, the database should be in a Clean Shutdown state.

To check the status of the unmounted/offline database, use the following command in Command Prompt or EMS window on your Exchange Server.

EseUtil /MH <Database_Name>

3. Recover Database with EseUtil

If the database is in a Dirty Shutdown state, you must recover the database and bring the status to a Clean Shutdown state. For this, you can first try the Soft recovery with EseUtil commands.

Execute the following command in Command Prompt or EMS window to perform soft database recovery.

Eseutil /r ?prefix?<E00> /l <log file location> /d <database location>

For instance,

Eseutil /r E000 /l ?C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Logs? /d ?C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\ MyMailboxDatabase.edb? /i

After executing the above command, check the output. If the recovery is successful, check the status of the database again by using the following command.

ESEUtil /MH <Database_Location>

If it shows the database in a Clean Shutdown state, you may go ahead and try mounting the database.

If the database status is still Dirty or it does not mount, you may need to perform eseutil hard recovery.

However, hard recovery is risky and may cause data loss as it purges irrecoverable or uncommitted mailboxes and mail items from the database during the recovery process.  Thus, proceed at your own risk.

The command to perform hard recovery on the database are as follows:

Eseutil /p <path to database file>

Again check the status of the database after Hard Recovery,

ESEUtil /MH <Database_Location>

The state of the database should now change to Clean Shutdown.

4. Use Exchange Recovery Software

If the database is severely damaged or corrupt, these commands and workarounds will not work. In such a case, the only solution is to use Exchange recovery software to repair the damaged Exchange database.

We highly recommend the software over ‘hard recovery‘ to avoid data loss. If the soft recovery fails, you can download, install and use the software on your server machine to repair the database, extract all mailboxes and mail items and save them as individual PST files. You can also export the recovered mailboxes from the repaired database directly to a new database on your Exchange Server or upload them to Office 365 tenant.  

All this can be done in a few clicks and without any additional permissions or roles. However, you need administrator account credentials to import or export mailboxes from a corrupt database to a new database on live Exchange.

Once the import is done, you may go ahead and delete the damaged database from the server. Users can now access their mailboxes and email accounts. They can now send or receive emails and use their account normally.

Conclusion

The Exchange database mount error ?unable to mount database (hr=0x80004005, ec=-1032)? can be resolved by performing a few recovery operations on the database files by using the EseUtil utility. The utility helps to resolve the problem that causes the ?hr=0x80004005, ec=-1032? error in Exchange Server, preventing administrators from mounting the database. After the fix, you can reattempt the database mount. Also, avoid hard recovery to prevent data loss. Instead, if the database is severely damaged or corrupt, you need to create a new database file on the server, repair the corrupt database file by using Exchange recovery software and then import the repaired

Related Post