Help restoring/repairing a corrupt Exchange 2003 database

We have a client with a single Microsoft Small Business Server 2003, running Exchange 2003.  They had a power outage over the weekend, and now the exchange store will not mount.  I placed a call with Microsoft Pro support, who provided limited help due to the server running on VMWare ESXi 4.0.  The MS tech checked the integrity of the database, and attempted a soft repair, which failed, here are the results :

C:\Program Files\Exchsrvr\bin>eseutil /r e00 /d D:\Exchsrvr\mdbdata /l "C:\Progr
am Files\Exchsrvr\MDBDATA"

Initiating RECOVERY mode...
    Logfile base name: e00
            Log files: C:\Program Files\Exchsrvr\MDBDATA
         System files: <current directory>
   Database Directory: D:\Exchsrvr\mdbdata

Performing soft recovery...

Operation terminated with error -255 (JET_errDatabaseBufferDependenciesCorrupted
, Buffer dependencies improperly set. Recovery failure) after 6.15 seconds.

After this he recommended restoring from backup, and would not help any further.  Our backup solution is Ahsay, which allowed me to restore the edb and stm  and log files.  I restored them to an external hard drive from my backup location, copied them to the Exchange server, and attempted to mount the store, and received the followng error:

Event Type:      Error
Event Source:      ESE
Event Category:      Logging/Recovery
Event ID:      619
Date:            4/5/2010
Time:            4:03:19 PM
User:            N/A
Computer:      LAW-SVR-01
Information Store (8100) First Storage Group: Attempted to attach database 'D:\Exchsrvr\mdbdata\priv1.edb' but it is a database restored from a backup set on which hard recovery was not started or did not complete successfully.

When I run eseutil /mh on the restored priv1.stm and edb files they show as a "Dirty Shutdown"

From what I understand, In order to run a hard recovery on this restored database, I need a restore.env file.  Ahsay did not create this file during the restore process.  It would appear that the backup file I restored was just a copy of the priv.stm and priv.edb files. I have not been able to get ahold of Ahsay.   I then placed the restored priv1.edb and priv1.stm files in the "D:\temp\first storage group" folder and attempted to run eseutil /cc, this errored out.

Now I am at a loss as to what the best solution should be.  How can I get the restored database up and running? Or should I just run a hard repair (eseutil /p) on the original exchange database?  I believe that will lose any information contained in the log files...

Any help is greatly appreciated! Thank you.

Ben Kolb
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Your Choices are limited in this case. You will need to run eseutil /p or use a third party tool such as Ontrack Power Control for Exchange ( or edb repair tool. which will give you an option to export mailboxes to PST. and they can read directly from edb files.

Best of Luck,
Shreedhar EtteCommented:

What is the database size? I can see only option avabainl is hard repair eseutil /p

Glen KnightCommented:
You will need to run the following commands:

hard repair: ESEUTIL /P "databasename.edb"
integrity check: ISINTEG -fix -test alltests

to run both tests the store must be dismounted.

more information on these utilities can be found here:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

@demazter and Shreedhar : Could you please make me understand how the solution you have suggested is different than the one in the first Comment ???

Shreedhar EtteCommented:
HI Hilal,

When we opened the question there was no comment? It does take few minutes type the solutions.

I hope you understand,
Understood and It is Cool.

benkolbAuthor Commented:
The databases are 3.5 GB for the Priv1.edb and 3.8 GB for the .stm.

I spoke with Ontrack, who recommend that I download the free version, it will at least show me what can be recovered.  I'll post back with the results.

Thank you for the quick replies!

You are welcome :)

Shreedhar EtteCommented:
That's great..
Glen KnightCommented:
>>@demazter and Shreedhar : Could you please make me understand how the solution you have suggested is different than the one in the first Comment ???

Well for a start there is no mention of ISINTEG in your post.  You also don't provide the full command or provide any follow up information (in the form of a link).  Hilal unlike others I don't post unless I can add value to a question and I believe I did that.  Besides that you will see there was a matter of minutes between yiur post and mine.  Did it cross your mind that I might not have seen your post?

why would you pay for ontrack when you don't need to?
If you insist in using a 3rd party tool Kernel EDB is much cheaper and does the same job.  I use Kernel regularly.

but as I said a simple repair as per my first post should fix it.
Vishal BreedProgram ManagerCommented:
I would suggest to have check this command.

eseutil /r R00 /i /L”D:\MDBDATA1” /S”D:\MDBDATA1” /D”D:\MDBDATA1”

We use this command when we restore exchange databases using RMSE software which copies the databases and log files as backup when services are running. While restoring, RMSE also does not create restore.env!

/L - Log files path which are restored
/S - system files which are restored
/D - Databases which are restored.

To avoid confusion, restore all log files, system files and databases in single folder along with logfiles from MDBDATA and then execute this command.
benkolbAuthor Commented:
After my last post here I spent a few hours working with my backups, to no avail, which left me with the hard repair option.  Here is how it was ultimately fixed:

After attempting to run Eseutil / p I received the following error:

Operation terminated with error -1032 (JET_errFileAccessDenied, Cannot access file, the file is locked or in use)

I then moved all files out of the mdbdata directories save for the priv and pub files
Disabled all exchange, exchange antivirus, and antispam services, rebooted server and ran the following commands:

Eseutil /p “D:\exchsrvr\mdbdata\priv1.mdb”
Eseutil /d “D:\exchsrvr\mdbdata\priv1.mdb” /t “D:\Temp\dfrgtemp.edb”
Eseutil /p “D:\exchsrvr\mdbdata\pub1.mdb”
Eseutil /d “D:\exchsrvr\mdbdata\priv1.mdb” /t “D:\Temp\dfrgtemp2.edb”

Mounted DB in System Manager, detached DB (per MS tech & EE article)

Isinteg –s “Servername” –fix –test alltests

Ran it twice for both pub and priv (fixes were made in the first run, clean in the second)

Ran local ntbackup
Ran ahsay backup seed load to take offsite.

Articles I found useful (aside from the one posted by demazter, which was excellent):

For those of you who are new to exchange:

Here's a little add-on to demazter's Accepted Solution:

After running the eseutil /p command, you need to remove all of the LOG files in the MDBDATA directory.  Otherwise the stores will not mount.  This is because the database is now "clean" after the repair, and if Exchange sees LOG files it thinks there's catching up to do and it freaks out.

I've been working on an issue like this all day today.  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.