17 September 2015

Not able to mount database - Eseutil.exe to the rescue

The following error may occur:

[PS] D:\Data\mdb1\MDB1>Mount-Database mdb1 -Force -AcceptDataLoss
Failed to mount database "mdb1". Error: An Active Manager operation failed. Error: The database action failed. Error:
Operation failed with message: MapiExceptionDatabaseError: Unable to mount database. (hr=0x80004005, ec=1108)
Diagnostic context:
    Lid: 65256
    Lid: 10722   StoreEc: 0x454
    Lid: 1494    ---- Remote Context Beg ----
    Lid: 45120   dwParam: 0x592663
    Lid: 57728   dwParam: 0x5927CA
    Lid: 46144   dwParam: 0x5931BD
    Lid: 34880   dwParam: 0x5931BD
    Lid: 34760   StoreEc: 0xFFFFFB40
    Lid: 41344   Guid: f3254d9d-1279-4fb4-8ce9-6b830204afac
    Lid: 35200   dwParam: 0x10BC
    Lid: 46144   dwParam: 0x593816
    Lid: 34880   dwParam: 0x593816
    Lid: 54472   StoreEc: 0x1388
    Lid: 42184   StoreEc: 0x454
    Lid: 1750    ---- Remote Context End ----
    Lid: 1047    StoreEc: 0x454      [Database: MDB1, Server: sr-XXXXX-t.domain.lan]
    + CategoryInfo          : InvalidOperation: (MDB1:ADObjectId) [Mount-Database], InvalidOperationException
    + FullyQualifiedErrorId : [Server=SR-XXXXX-T,RequestId=32e76a8d-ed5f-4bc4-9a43-e84014d2a340,TimeStamp=9/17/2015 9:
   40:52 AM] [FailureCategory=Cmdlet-InvalidOperationException] BC20DD3D,Microsoft.Exchange.Management.SystemConfigur
    + PSComputerName        : sr-XXXX-t.domain.lan

After checking the disk space and all other obvious places do the following:

Copy all the original database and log files to somewhere safe. 
Then also copy them into a working directory. 
Eseutil will modify the files in situation so if it goes wrong you don't want your original files modified.

You need to have a copy of the database files (*.edb and *.stm) plus the transaction logs
(Exx*.log where xx is a number relating to the information store).
The location of the files is available from exchange system manager, but you really should know where they all are anyway.

From the database path run:

eseutil /mh databasename.edb

eseutil /p databasename.edb

eseutil /mh databasename.edb

Then  move all the log files away from Exchange log folder:
x:\databasename\Logs\*.* to x:\Temp\databasename\Logs\*.*

Then mount the database:

Mount-Database mdb1 -Force

ESEUTIL explanation:
Eseutil defragments the database files. This mode reduces the gross size on disk of the database (.edb) and streaming files (.stm) by discarding most empty pages and ad hoc indexes.
Eseutil repairs corrupt database pages in an offline database but discards any that can't be fixed. In repair mode, the Eseutil utility fixes individual tables but does not adjust the relationships between tables. ISInteg should be used to check logical relationships between tables. 
Eseutil displays the Restore.env file and controls hard recovery after restoration from online backup.
Eseutil replays transaction log files or rolls them forward to restore a database to internal consistency or to bring an older copy of a database up to date.
Eseutil verifies the page level and Extensible Storage Engine (ESE) level logical integrity of the database but does not verify database integrity at the Information Store level.
File Dump
Eseutil displays headers of database files, transaction log files, and checkpoint files. The mode also displays database space allocation and metadata.
Eseutil verifies checksums on all pages in the database and streaming files.
Copy File
Eseutil performs a fast copy of very large files.


  1. Anonymous22/3/17 14:36

    Thank you so much for this information. Our Exchange server ran out of space because our new Unitrends backup wasn't clearing the transaction logs. These directions helped me recover one of our databases that wouldn't mount. I'm not an Exchange expert, so this really helped, thanks.

  2. Thank you, It is working for me.

  3. Thanks for writing this post the command Mount-Database mdb1 -Force -AcceptDataLoss save my life .............

    Thumbs up
    Ihsan khan