Clean and dirty shutdown of Exchange database
In an Exchange server environment, the database (also known as EDB file) holds user mailboxes, folders, attachments, notes, tasks, journals and other mailbox data. The Exchange server transactions like update, delete, edit are written to the log files and finally committed to the Exchange database. When these transactions are up-to-date and are in sync with the transaction logs, the database is said to be in the Clean Shutdown state. In this state, the EDB file is mounted to the server and is free from errors or any corruption.
On the other hand, when the database becomes severely corrupted or when the transaction log files are deleted before the entries are committed, the EDB is said to be in the Dirty Shutdown state. It is common for the EDB to dismount when it is in the Dirty Shutdown. However, in some situations, the Exchange database can also dismount when it is in the Clean Shutdown state. In this article, we look at the common reasons of mounting failure when the EDB is in the Clean Shutdown and the steps to resolve the issue.
How to check the state of the Exchange database?
Eseutil is a Microsoft built-in utility to check the Exchange database state. It is installed in the Exchange server bin directory. Depending upon your Exchange server versions, navigate to the location of eseutil and start the Windows command prompt as a system administrator.
Run the following cmdlet to check the Exchange database state
C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\MBX1 eseutil /mh “MBX1.edb”
The cmdlet eseutil /mh checks the status and under the State field, you can see if the database file is in the Dirty Shutdown or Clean Shutdown as shown.
If the Exchange database is in the Clean Shutdown, you can normally mount it with the Mount-Database cmdlet.
Mount-Database -Identity ExchangeServer1\MBX
However, the EDB may fail to mount even when it is in the Clean Shutdown state due to various reasons.
How to resolve the issue ‘Exchange Database in Clean Shutdown does not mount’?
When an Exchange database in Clean Shutdown fails to mount, it indicates a database indexing issue or insufficient space on the hard disk. When you open the Event Viewer, you might see the following error message with the error code (ec) 1142 and Event ID:1009.
The indexing of mailbox database MBX1 encountered an unexpected exception. Error details: Microsoft.Exchange.Search.Core.Abstraction.OperationFailedException: The component operation has failed. —> Microsoft.Exchange.Search.Engine.FeedingSkippedException: Feeding was skipped due to state Unknown. Failed to read notifications, MDB: 6ef27c68-8839-4397-8f0f-64420c2f788e. —> Microsoft.Mapi.MapiExceptionMdbOffline: MapiExceptionMdbOffline: Unable to read events. (hr=0x80004005, ec=1142)
Method 1: Check and restart the Exchange server services
The first solution is to check if the Exchange Server and database related services are running. The service Microsoft Information Store manages the mailbox and public folder database. If they are suspended by another conflicting application or blocked by an antivirus software, the mailbox and public folder databases are unavailable and the services that depend on it also fail to start. Follow the steps to restart the services.
- Press 'Window Key + R' and type 'services.msc'
- Find the service named Microsoft Exchange Information Store and Microsoft Exchange Mailbox Replication. Right click on the item and select 'Start'. If the service has been disabled or stopped, click 'Restart'
Note: If an antivirus software on your computer is blocking the Exchange services, disable the antivirus temporarily or add a whitelist to exclude the Exchange services.
Method 2: Check the drive storage space on your computer
Consider upgrading the hard drive to a higher capacity drive on which the Exchange server is installed. When the database grows in size, it may fail to mount due to insufficient storage space even when it is clean.
- Right click on the Drive > Click 'Properties'
- Check the Free Space of the Volume
If you're running out of space where the Exchange server is installed, consider upgrading your hard drive or moving the database to a different drive or location.
See Exchange server storage configuration options for single and multiple databases per volume.
There is another concept of Circular logging which rewrites the transaction logs without creating new ones. Enabling the circular logging is generally not recommended unless the storage space is running very low. The transaction log files are required if you want to perform a soft recovery with eseutil. As a result, create a backup of the Exchange database with the Windows server backup to copy and safely purge the transaction logs.
Method 3: Check the database cluster and reboot the Exchange server
If your Exchange database is a part of the Database Availability Group (DAG), open the Failover Cluster Manager to check if the clusters are in a healthy state. If any member of the DAG is offline, the Exchange database fails to mount to the server.
Reboot the Exchange server if it is offline and repeat the steps for the others. After the reboot, check the status of the clusters and the database. The cluster should now be online and the databases must be successfully mounted.
Method 4: Perform a reindexing of the Exchange database
The Update-MailboxDatabaseCopy cmdlet seeds a content index catalog for a mailbox database copy.
Update-MailboxDatabaseCopy -Identity DB1\MBX1 -CatalogOnly
The following cmdlet reseeds the Exchange database copy by deleting and updating the existing files.
Update-MailboxDatabaseCopy DB1/MBX1 -DeleteExistingFiles
If none of the aforementioned solutions work, it is recommended to use a third-party Exchange recovery software to restore your mailboxes from the Exchange database file. The following section describes the recovery and migration with EdbMails.
Method 5: Repair and migrate the EDB file to Exchange with EdbMails
EdbMails repair tool for Exchange is a Microsoft partnered software for recovering both healthy and corrupted EDB files and enables you to migrate your mailboxes from EDB to Live Exchange server and export to Outlook PST. It is compatible with Exchange 2019, 2016, 2013, 2010 and 2007 and can recover Exchange databases in Clean Shutdown that fail to mount. The following steps describe the migration operation.
- Download EdbMails and install the application on any computer that is connected to the source and target environment. You can also perform the recovery operation on any non-Exchange server computer.
- Launch the application and click 'Login' or 'Start Your Free Trial'
- Select the recovery technique as EDB to PST. EDB to Office 365. EDB to Exchange.
See a detailed list of EdbMails system requirements. Make a copy of the EDB, STM and log files before you proceed with the recovery and migration operation.
- Step 1: Select the EDB file in Clean shutdown that fails to mount
Select the offline and dismounted Exchange database file that you want to recover. EdbMails recovers the contents and displays all your mailboxes where you can preview individual mail items. The application can recover mailbox.edb, pub.edb, priv.edb and STM files.
- Step 2: Select the mailboxes to perform the export operation
Select the mailboxes, folders and mailbox items and click 'Migrate to Live Exchange' to perform Exchange migration to the target. EdbMails can also migrate Public folders from the EDB file to Live Exchange 2019, 2016 and 2013.
- Step 3: Connect to the target Exchange server and map the mailboxes
Select 'Connect using Global admin User' and select 'Connect to Mailbox(es)'. You can also connect to a specific user mailbox or load a list of user mailboxes by using a CSV file. See the instructions on how to use the different Exchange server connection methods supported by EdbMails.
With EdbMails, you can migrate mailboxes, public folders, and archive mailboxes from the source EDB file to the target server.
The mapping activity in EdbMails can automatically match and map the mailboxes and folders with the Exchange server and saves time when you’re migrating a large number of mailboxes.
- Step 4: Start the migration from the EDB file to Exchange server
After you complete the mapping, start and monitor the migration. Finally, verify the count of migrated emails, folders and mailbox items with EdbMails text-based log report. With this method, you can safely recover a dismounted EDB file and migrate all your mailboxes from EDB to Exchange server.
If you require further assistance, contact EdbMails 24x7 support. Try the free trial version today to recover and migrate a clean EDB file that fails to mount to the Exchange server.
You can also directly migrate the EDB to Office 365 or export Exchange mailboxes to PST format.
See the steps if you want to export Exchange mailboxes to PST format.
Conclusion
When the Exchange database in Clean Shutdown fails to mount, it is most likely an issue with the storage space or database indexing. To resolve the problem, restart the Exchange server services or reindex the database. If the Exchange server is a part of the DAG, you must check if any clusters are unavailable and reboot the Exchange server. If these solutions do not resolve the problem, you must repair the database with EdbMails Exchange recovery tool. The application can help you migrate the mailboxes from the clean EDB file directly to another Exchange and reinstate your data in an instant. You can also convert the EDB file to PST and import the mailboxes into Outlook.