Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Exchange database restore: Dirty Shutdown

Posted on 2012-03-20
Medium Priority
Last Modified: 2012-03-28
I have a situation where an employee left the firm and deleted his email.  Since he was a trusted employee (mistake!) no one thought to check for this until after the retention period had expired.  I was asked to restore from backup and retrieve his mailbox from a previous date.  For some reason I cannot complete the eseutil /r process and replay the log files.  I keep getting errors:

Operation terminated with error -501 (JET_errLogFileCorrupt, Log file is corrupt) after 42.141 seconds.

The eseutil /mh reported a Dirty Shutdown and said I needed log file E0025286.  I retrieved that from backup on same day, renamed it to E00.log, but got the error.  So I thought, hmmmm....maybe the log file is truncated.  So I checked the backup from the next day and found a log file with the same name.  I tried that one, changing the name to E00.log but got the error.  I then tried using the older 25286 (original file name) with the newer 25286 renamed E00.log.  Got the error.

I decided screw it, I'm running a repair.  But the eseutil /p priv1.edb command now comes back with an error:

Error: Access to source database 'priv1.edb' failed with Jet error -1811.

Operation terminated with error -1811 (JET_errFileNotFound, File not found) afte
r 3.94 seconds.

The .edb file is there but I notice it now has a new date stamp with today's date.  I'm stumped.  I'm doing all of this utility work on an external USB drive.  I have performed this task once before and it worked but this time it is not going so well.

Any ideas?

Question by:12vltmn
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 37745228
Run the utility from the directory where the file exists.  Also make sure you have 2x the amount of space available to allow for the temp file to be created.  

I believe you also need to make sure Information Store is not running.
LVL 19

Expert Comment

ID: 37745395
File not found error means it is not finding the file to repair. please use the proper path.

Expert Comment

ID: 37745964
Please dont rename any log files and copy the missing log file to trnsaction logs location and then replay gain logs using Eseutil /r / e00 /i  command
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments


Author Comment

ID: 37747641
@ltsweb:  I am running the utility from the same directory as the location of the database files and log file.  I placed the \bin folder in the search path so I can run it from anywhere on the server.  I have an external USB drive attached, a folder created on that drive, and the database files and log file in that folder.  From a DOS prompt in that folder I run the utility.  From everything I have read, nothing states I have to do anything with the information store.  Once the log files are replayed into the database I will copy to the Recovery Storage Group and use ExMerge to pull out the mailbox.

@R-R:  As stated, the database files and log file are in the same directory on a USB drive.  I  use this command from that directory:  eseutil /r E00 /i /d
When the process starts it says "database files in current directory | log files in current directory | system files in current directory

@ash007:  when I do not rename the log file I get an error saying the log file was not found.  I'm sure I read somewhere that I must rename the last log file in the sequence to "E00.log".  Since there is only one log file needed to replay, I renamed it E00.log.  I tried running the recovery without renaming and I get the error I just mentioned.  When you say copy to transaction logs don't mean to live location, do you?  This is a recovery operation for the Recovery Storage Group.  I'm not messing with my live logs.

Author Comment

ID: 37748417
The results from eseutil /mh priv1.edb:

X:\092411>eseutil /mh priv1.edb

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode...
         Database: priv1.edb

        File Type: Database
   Format ulMagic: 0x89abcdef
   Engine ulMagic: 0x89abcdef
 Format ulVersion: 0x620,11
 Engine ulVersion: 0x620,11
Created ulVersion: 0x620,11
     DB Signature: Create time:09/23/2011 21:07:54 Rand:888357446 Computer:
         cbDbPage: 4096
           dbtime: 39898344 (0x260cce8)
            State: Dirty Shutdown
     Log Required: 193158-193158 (0x2f286-0x2f286)
   Streaming File: Yes
         Shadowed: Yes
       Last Objid: 10710
     Scrub Dbtime: 0 (0x0)
       Scrub Date: 00/00/1900 00:00:00
     Repair Count: 0
      Repair Date: 00/00/1900 00:00:00
 Old Repair Count: 0
  Last Consistent: (0x2F279,121A,105)  09/24/2011 16:24:58
      Last Attach: (0x2F279,1223,1C)  09/24/2011 16:26:42
      Last Detach: (0x0,0,0)  00/00/1900 00:00:00
             Dbid: 1
    Log Signature: Create time:07/14/2006 20:40:20 Rand:14496968 Computer:
       OS Version: (5.2.3790 SP 2)

Previous Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Previous Incremental Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Shadow copy backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

     cpgUpgrade55Format: 0
    cpgUpgradeFreePages: 0
cpgUpgradeSpaceMapPages: 0

       ECC Fix Success Count: none
   Old ECC Fix Success Count: none
         ECC Fix Error Count: none
     Old ECC Fix Error Count: none
    Bad Checksum Error Count: none
Old bad Checksum Error Count: none

Operation completed successfully in 3.312 seconds.

Expert Comment

ID: 37755314
The database is in a dirty state which means you need to repair it.

Microsoft will recommend you restore from backup.  

Your next step is eseutil /p. see

Note, you risk loosing data!

You will run it and then delete the old logs.  

You will also need to run isinteg -fix alltests to plug any errors in the file.


For process.

Good luck.

Author Comment

ID: 37757365
@ltsweb:  This IS a database restored from backup.  I am trying to recover a mailbox using Recovery Storage Group.  The log files won't replay, and I have already run eseutil /p on the database and it is still in a dirty shutdown state so it will not mount in the RSG.  Do you know if there is any way to run a utility on the log files themselves to see if they are truly corrupted and possibly repair them?  Per my previous posts I have tried to repair using eseutil /r and I get errors stating the log files are corrupt.  I thought I could only run isinteg on the "active" information store.  Can it be applied to a database in the RSG?  My thinking is no since you can't actually tell the utility which store, it just runs on the active...I believe.

Accepted Solution

12vltmn earned 0 total points
ID: 37758185
I finally was able to successfully do a repair on the database.  I restored a backup from a different date.  It was in a dirty shutdown state and said it only required one log file.  Rather than restoring only that one log file, I restored all of the log files from that backup date.  I ran "eseutil /r E00 /i /d" and it successfully replayed the log files into the database.  After, I ran "eseutil /mh" and it returned a clean shutdown state.  So, contrary to what I have read in the article from Microsoft, instead of restoring only the transaction logs that are shown as "needed" and renaming the last log in the sequence to "E00.log" I restored all the log files and did not rename the last log in the sequence. The repair utility created a checkpoint file as well as a new E00.log file.  The repair was successful and I am now copying to the RSG so I can extract the mailbox using ExMerge.

Author Closing Comment

ID: 37775687
The responses I received were not clear nor concise.  After trying multiple possible solutions I seem to have hit on the one that works.

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question