Microsoft Exchange Server is the email server that hosts numerous email accounts of an organization’s employees in its databases and creates unique mailboxes for each account. To record the actions of each mailbox, some transaction logs are created automatically. The consistency of transaction logs ensures that everything is fine in the Exchange environment. When the Server is not shut down properly, then these transactions are not recorded properly and it is called a dirty shutdown situation.
You may get various kinds of errors denoting the dirty shutdown situation-
“Operation terminated with error -550 JET_errDatabaseDirtyShutdown, Database was not shutdown cleanly.”
“Exchange is unable to mount the database that you specified database”
The term dirty shutdown is self-descriptive and mentions that the server was not closed properly and transaction logs are in a mess. There can be varying reasons being the occurrence of such dirty shutdown errors-
- A dirty shutdown problem may occur when a computer system is not properly shut down.
- A serious virus, spyware, or Trojan attack on the database could prevent it from functioning and possibly leave it unclean.
- A database hacking effort could result in errors such as dirty shutdown issues.
- The unclean shutdown issue will happen if the user abruptly turned off the computer when Exchange was open or there was a process running.
- The Exchange Server may suddenly crash under exceptional circumstances.
How to determine Exchange server is in a dirty shutdown situation?
When EDB or STM files are improperly disconnected from the transaction log files, the database enters the unclean shutdown condition. This problem prevents the server from reading the transaction logs, which results in transactional discrepancies. And in this case, the user receives the dirty shutdown error when attempting to open EDB files. In PowerShell, you can run the ESEUTIL tool with the ‘mh’ switch and it will show the state of the server along with other details.
Eseutil /mh ‘complete path of Exchange database file\databasefile.edb’
It will show the state of the database as either clean or dirty.
In the second line of the dirty shutdown state, you can read that there is a log required from 23 to 27.
The next procedure will be repairing the corrupt EDB file and mounting it back to the live Exchange Server. You will replay those logs and it will make the database consistent and useful again. You can use the same ESEUTIL tool to repair the database file sequentially.
- Soft recover the database
The software recovery will scan the EDB and try to repair it for minor issues
Eseutil /r ‘complete path of Exchange database file\databasefile.edb’
After running the repair, you can execute Eseutil /mh command and check for the clean shutdown state. - Hard recover the database
When soft repair does not remove the problem, then you can hard repair it using a different switch.
Eseutil /p ‘complete path of Exchange database file\databasefile.edb’ - Defragment the database
The ESEUTIL tool creates some blank space in the database while repairing the database. When you scan it multiple times, then there are greater blank spaces (called whitespace) that you must remove. Run the new command-
Eseutil /d ‘complete path of Exchange database file\databasefile.edb’
After that, you can check the state of the database again and if it turns to clean, then mount the database back to the server.
It will take several hours to repair a database using the ESEUTIL tool, and there is no assurance that the database will be recovered. However, during the procedure, users won’t be able to view, send, or receive emails. Loss of data can lead to legal requirements in addition to business elements, where business possibilities can be lost due to downtime. The issue would need to be fixed as quickly as feasible without affecting any data.
Conclusion
Professional Exchange Recovery software can repair the database in a single scan and recover all the mailboxes. It can extract mailboxes in multiple kinds of formats and save them locally. It can also restore the mailboxes to a live Exchange directly and migrate them directly to Office 365. After repairing the database, you can get a preview of all items and the professional best Exchange recovery software will provide you with an ample number of filters to apply to all the mailboxes before converting them to any format.