Scenario:

Exchange 2010 Database File is Locked.

Database shows in dismounting status

Unable to run eseutil

eseutil /mh <Database Name>
Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 14.03
Copyright (C) Microsoft Corporation. All Rights Reserved.
Initiating FILE DUMP mode...
Error: Access to source database 'database.edb' failed with Jet error -1032.
Operation terminated with error -1032 (JET_errFileAccessDenied, Cannot access file, the file is locked or in use) after
0.31 seconds.

 

Name                                  Status          CopyQueue ReplayQueue LastInspectedLogTime   ContentIndex
                                                       Length    Length                             State
----                                  ------          --------- ----------- --------------------   ------------
Database Name                         Dismounting     0         0                                  Failed

Troubleshooting Steps 

  1.  Recycle the Information Store Services
  2.  Make the disk hosting the database offline from diskmanagement.msc and then bring it on line . This would release the lock on the database
  3.  Verify if the database is in cleanshutdown state (eseutil /mh databasename). If the database is in dirty shutdown state, run eseutil /r E01(Log file prefix) /l logfile path to replay the log files and make sure the database is in clean shutdown state
  4.  Mount-database <databasename> if the mount fails Proceed step 5
  5.  Disable/Uninstall the antivirus on the server / Verify the AV exclusions
  6. Change the log folder name and try mounting the database
  7.  If you are not able to change log folder name, Download Procmon and check process locking the log file path
  8.  Change the Database Log folder Path and try mounting the database
  9. Reboot the server