How to Resolve unable to mount database. (hr=0x80040115, ec=-2147221227)

Summary: The MapiExceptionNetworkError (hr=0x80040115, ec=-2147221227) is a database mounting error that appears when an Exchange admin attempts to mount a dismounted or offline Exchange database (EDB) file. In this guide, we have discussed solutions to fix this error, mount the database, and restore mailboxes.

To mount a database (EDB) file in Exchange Server, Mount-Database cmdlet is used, which is available only in on-premises Exchange. However, the cmdlet mounts database only if the Microsoft Exchange Information Store Service and Microsoft Replication service are up and running.

Also, the user account should have permissions assigned to run Mount-Database cmdlet to restore a dismounted or offline database file. If the user doesn’t have sufficient permissions, required Exchange services are down, or database is corrupt, a database mounting error occurs, such as,

MapiExceptionNetworkError: Unable to make admin interface connection to server. (hr=0x80040115, ec=-2147221227)
Diagnostic context:
Lid: 15000 dwParam: 0x6BA Msg: EEInfo: prm[1]: Pointer val: 0x0000000000000000
Lid: 15000 dwParam: 0x6BA Msg: EEInfo: prm[2]: Pointer val: 0x1600A8C000000000
Lid: 16280 dwParam: 0x6BA Msg: EEInfo: ComputerName: n/a
Lid: 8600 dwParam: 0x6BA Msg: EEInfo: ProcessID: 124904
Lid: 12696 dwParam: 0x6BA Msg: EEInfo: Generation Time: 2014-02-26 21:31:54:96
Lid: 10648 dwParam: 0x6BA Msg: EEInfo: Generating component: 8
Lid: 14744 dwParam: 0x6BA Msg: EEInfo: Status: 10060
Lid: 9624 dwParam: 0x6BA Msg: EEInfo: Detection location: 318
Lid: 13720 dwParam: 0x6BA Msg: EEInfo: Flags: 0
Lid: 11672 dwParam: 0x6BA Msg: EEInfo: NumberOfParameters: 0
Lid: 24060 StoreEc: 0x80040115
Lid: 23746
Lid: 31938 StoreEc: 0x80040115
Lid: 19650
Lid: 27842 StoreEc: 0x80040115
Lid: 20866
Lid: 29058 StoreEc: 0x80040115
Exchange Management Shell command attempted:
‘Mydomainname.local/OurBusiness/Users/test’ | move-mailbox -TargetDatabase ‘SERVERNAME\First Storage Group\Mailbox Database’
Elapsed Time: 00:00:45

In such cases, you may follow the below discussed manual methods to repair, restore and mount the database through command line tools or use a GUI based Exchange recovery software, such as Stellar Repair for Exchange, to recover mailboxes from damaged database and restore them to a healthy database on a Live Exchange server directly in a few clicks.


Methods to Resolve Unable to Mount Database (hr=0x80040115, ec=-2147221227)

Follow these methods and workarounds to fix the “MapiExceptionNetworkError: Unable to make admin interface connection to server. (hr=0x80040115, ec=-2147221227)” error.

NOTE: If you are trying to mount a database file copied from another server for DAG and failover protection, use the following command before mounting the EDB file,

Set-MailboxDatabase DB01 -AllowFileRestore $true

Method 1: Check Database State

You can’t mount a database which is in Dirty Shutdown state. Thus, it’s important to check and bring the database to the Clean Shutdown state, before mounting it. To check whether the database is in Dirty Shutdown or Clean Shutdown state, run the following command in PowerShell as an administrator,

eseutil /mh "PATH TO EDB FILE\MyDatabase.edb”
check database state

If the output displays State: Dirty Shutdown, you need to bring the database to Clean Shutdown state to mount it successfully and avoid the error MapiExceptionNetworkError: Unable to make admin interface connection to server. (hr=0x80040115, ec=-2147221227).

dirty shutdown state

Use the following PowerShell command to fix the database and bring it back to the Clean Shutdown state.

eseutil /p "PATH TO EDB FILE\Database.edb”

After executing this command, use the following command to again check the shutdown state of database. It should be State: Clean Shutdown.

eseutil /mh "PATH TO EDB FILE\MyDatabase.edb”
clean shutdown state

After restoring the database to clean shutdown state, check the log files.

Method 2: Check Log Files

To check the database log files, run the following command in PowerShell,

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

In this command, E00 is the starting sequence of the logs.

If the output displays a list of log files with the status of log files as OK, then try re-mounting the database.

check exchange log file status

In case the database shutdown state is Clean and log files are OK, but the database still does not mount, follow this guide, Is your Exchange database as in a ‘Clean Shutdown’ state? But it is not mounting?

Method 3: Check Exchange Services

If the database mount fails even when the database is in clean shutdown state, check and confirm that the following Microsoft Exchange services are up and running,

  1. Microsoft Exchange Information Store Service
  2. Microsoft Replication Service
  3. Microsoft Exchange System Attendant
restart MS Exchange services

To view these services, press Windows+R, type services.msc and press ‘Enter’ or click ‘OK’.

If these services are not running, right-click on the service and choose Restart.

Method 4: Defragment the Database

You may also perform database defragmentation to optimize the database file and prepare it for mount. The command is as follows,

Eseutil /d “Database File Path\database.edb”

Method 5: Recover Database

Further, you may try to perform Soft or Hard Recovery on the database. Soft recovery is safe and can be performed by using the following command,

Eseutil /r /l "PATH TO LOG FILES\E00" /d "PATH TO DATABASE FILE\Database.edb"

However, hard recovery could cause problems and thus, not recommended unless you have database backup.

Method 6: Use Exchange Recovery Tool

To restore offline or dismounted database, you can use an Exchange database repair software, such as Stellar Repair for Exchange. If none of the methods work, it could be a case of damaged or corrupt database. Thus, you need an Exchange recovery tool to repair damaged Exchange database files and recover corrupt, dismounted, or offline database files.

The software recovers all the mailboxes from the database and mail items, such as emails, attachments, contacts, notes, tasks, calendars, journals, and public folders. It also recovers deleted mailboxes from the Exchange database file.

After fixing the database file, you can export the database mailboxes directly to a Live Exchange server or Office 365 account. This way, you can avoid various database mount cmdlets and troubleshooting methods, and restore the database without any data loss.

While the cmdlet works from Exchange 2010 SP1 and later versions, the software supports all Exchange versions, such as MS Exchange 2019, 2016, 2013, 2010, 2007, 2003, 2000, and 5.5.

Overall, Stellar Repair for Exchange is the most effective and easiest way to repair and restore mailboxes and database that fails to mount. Plus, it doesn’t require log files or any permissions (besides administrator credentials) to perform the database repair and restore operations.

For detailed steps, follow this instructional guide on How to Recover the Corrupt/ Inaccessible Exchange Mailboxes Using this Software?

In case you need more help, leave a comment, or reach us via the Self Help and Support page.