Lucid8 created this article as a courtesy and will not provide further support or guidance unless you have engaged a team member for paid Professional Services for Microsoft Exchange.  All information in this article is provided on an "AS IS" basis with no warranties, guarantees of completeness, accuracy, usefulness or timeliness, and as such any action you take thereafter, are done so at your own risk.  

NOTE: If you would like assistance in regards to your Exchange Database .EDB files, for self-service check out DigiScope or engage one of our experts for paid  Professional Services for Microsoft Exchange  assistance.

ESEUTIL /R - Soft Recovery of Exchange Database

In some situations a Dirty Shutdown may occur. When you see such a status displayed next to the State header, this can mean some required log files are missing/not yet committed to the db or there may corruption within the dB or log files. 

The screenshot below shows the results of the ESEUTIL /MH <database_name> cmdlet for the Fabrikam-13 database. The areas outlined in red show that;

  • The Fabrikam DB is in a Dirty Shutdown State
  • Logs Required are 3500-3563 in Decimal and as (0xdac-0xe45) in Hexadecimal.  
    • The actual .Log files on disk are named by using the combination of the <log prefix> and the Hexadecimal value at the tail of the first and last required log file needed for soft recovery.
    • The log prefix for the Fabrikam-13 database is "E01" therefore in order to attempt soft recovery we must have a sequential set of log files beginning with E0100000DAC.log and ending with E0100000E45.log

 Validate that you have the required log sequence along with the state of each log by using the cmdlet: ESEUTIL /ML <log prefix, i.e. E00, E01 etc).  For this example our log prefix is E01, therefore we would do the following:

  • Open CMD Prompt
  • Change to the log path
  • Use this cmdlet:

            ESEUTIL /ML E01

As you can see below none of the logs are corrupt and we have the required sequence of log files.


ATTENTION: Before taking action with ESEUTIL or any other utility against your Exchange Database .EDB file, make sure you have created a "MASTER Backup" of the .EDB and its associated (log & .chk) files which provides you with a rollback position in case something goes wrong wrong such as a power outage, hardware failure, etc.   


If you have the missing logs, the recovery process is straight forward. Simply execute the cmdlet below:

Template:

ESEUTIL /r <log_prefix> /l <path_to_the_folder_with_log_files> /d <path_to_the_folder_with_the_database>


Usage Example: In our case, the cmdlet string below is utilized:

ESEUTIL /r E01 /l "S:\Program Files\Microsoft\Exchange Server\V15\Mailbox\FABRIKAM-13\Logs" /d "S:\Program Files\Microsoft\Exchange Server\V15\Mailbox\FABRIKAM-13\Fabrikam-13"


Upon completion the outstanding logs are recovered/committed to the database along with confirmation of the operation being completed successfully as shown below.


ATTENTION:   If the recovery process fails, there are numerous potential issues, therefore 


Next, validate the EDB is in a Clean Shutdown state using the ESEUTIL /MH <database_name> cmdlet for the Fabrikam-13 database.



As you can see above the Fabrikam-13 database is now in a Clean Shutdown state and can be remounted by using the following cmdlet within Exchange PowerShell


Template:

Mount-Database -identity <database_name>


Usage Example:

Mount-Database -identity Fabrikam-13


FINAL ACTIONS: 

  • Run/Execute a new full Exchange Aware Backup of defragmented database
  • Delete the offline master backup copy of the EDB to free up disk space


NOTE:  Lucid8 created this article as a courtesy and will not provide further support or guidance unless you have engaged a team member for paid Professional Services for Microsoft Exchange.  All information in this article is provided on an "AS IS" basis with no warranties, guarantees of completeness, accuracy, usefulness or timeliness, and as such any action you take thereafter, are done so at your own risk. 

NOTE: If you would like assistance in regards to your Exchange Database .EDB files, for self-service check out DigiScope or engage one of our experts for paid  Professional Services for Microsoft Exchange  assistance.