corrupt .edb

I have an exchange server with a .edb that is in a dirty shutdown state. I have 2 storage groups. The second storage group will not mount due to dirty shutdown. That database is on e: drive, the transaction logs are in C:\Program Files\Microsoft\Exchange Server\Mailbox\Second Storage Group I tried to run eseutil /mh e:\exdb2 but I get an error saying that the file is locked.

What is the exact command I need to run to repair the .edb?
WIZU2Asked:
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.

DipakCommented:
First you need to stop your Information Store service and back up everything (edb, stm, and log files) to a different disk. You must ensure that you have sufficient amount of free disk space.

Now, follow the steps given below to get your database back to the clean shutdown state:
Initially, run the following command to verify your database consistency:

    eseutil /mh "c:\program files\exchsrvr\mdbdata\priv1.edb"

If you find the database state to be 'Dirty Shutdown', perform a soft repair using the below command:

    eseutil /r "c:\program files\exchsrvr\mdbdata\priv1.edb"

This command replays the transaction log files to make sure that all the database operations are successfully completed.

Perform a hard repair of your database using 'Eseutil /p' as follows:

    eseutil /p "c:\program files\exchsrvr\mdbdata\priv1.edb"

Defrag your database stores by using the 'Eseutil /d' command-line utility.

Finally check the database integrity by running the 'Isinteg' utility from the BIN folder as follows:

    'isinteg -s servername -fix -test alltests'

Please also refer following Microsoft's support article for same.

http://support.microsoft.com/kb/896143#3
0

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
WIZU2Author Commented:
Those paths don't exist in exchange 2007. My .edb is on the E: drive and log files in location above.
0
WIZU2Author Commented:
I get this error when I try to run the following.

c:\>eseutil /mh "e:\exdb2.edb"

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 08.03
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode...
Error: Access to source database 'e:\exdb2.edb' failed with Jet error -1811.

Operation terminated with error -1811 (JET_errFileNotFound, File not found) afte
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Ron MalmsteadInformation Services ManagerCommented:
His solution is still valid.. Your paths may vary.

You may also consider running chkdsk /r at boot.. In case it's a hdd failure in the works.
0
Ron MalmsteadInformation Services ManagerCommented:
Make sure you back up these files before performing any operation on them.
0
WIZU2Author Commented:
What about the error I am getting above?
0
Ron MalmsteadInformation Services ManagerCommented:
Either the path is wrong, or your file is on a corrupt sector of your hdd.

.. Can you copy the file? Without error?
Make sure exchange services are not running when you try this.
0
Ron MalmsteadInformation Services ManagerCommented:
Double check this.. "c:\>eseutil /mh" "e:\exdb2.edb"
0
WIZU2Author Commented:
I will try this as soon as my chkdsk is done
0
Ron MalmsteadInformation Services ManagerCommented:
Definitely ..
I find most of the problems I have with exchange, in any version.. Are symptoms of a hard drive about to fail.  Chkdsk may be able to recover bad sectors and allow you to perform the operations necessary for full recovery.  Of you do find bad sectors, replace that hard drive immediately.
0
DipakCommented:
You can use the Process Explorer to find out which process is using the .edb file. It'll tell you
the PID of the process. When you will find it, just kill that process and then try. If still it doesn't work then try following:

You can copy the database to another localization and then try the eseutil over the copied database, when finish rename the original database to .edbold and copy the esutiled (repaired) database in the same location of original database (drive E:\ in your case) and  mount database and finish.
0
WIZU2Author Commented:
Ok I got in and ran /mh and it does say dirty shutdown I then tried to run a repair and got the following error. The log files are in different location please help!!

c:\>eseutil /r e:\exdb2\exdb2.edb

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 08.03
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating RECOVERY mode...
    Logfile base name: e:\exdb2\exdb2.edb
            Log files: <current directory>
         System files: <current directory>

Operation terminated with error -1003 (JET_errInvalidParameter, Invalid API para
meter) after 0.0 seconds.
0
Ron MalmsteadInformation Services ManagerCommented:
Copy the log files to the same location.  Try again.
0
WIZU2Author Commented:
isn't there a way to insert the log file path into the command? It is saying will take 11 hours to copy files.
0
Ron MalmsteadInformation Services ManagerCommented:
http://support.microsoft.com/kb/182903

Yes there is an option for log path
0
WIZU2Author Commented:
I got further than before. Now I am stuck with the below error


c:\>eseutil /r e:\exdb2\exdb2.edb /lC:\ProgramFiles\Microsoft\ExchangeServer\Mai
lbox\SecondStorageGroup /sc:\ProgramFiles\Microsoft\ExchangeServer\Mailbox\Secon
dStorageGroup

Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 08.03
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating RECOVERY mode...
    Logfile base name: e:\exdb2\exdb2.edb
            Log files: C:\ProgramFiles\Microsoft\ExchangeServer\Mailbox\SecondSt
orageGroup
         System files: c:\ProgramFiles\Microsoft\ExchangeServer\Mailbox\SecondSt
orageGroup

Operation terminated with error -1003 (JET_errInvalidParameter, Invalid API para
meter) after 0.16 seconds.
0
Seth SimmonsSr. Systems AdministratorCommented:
/r switch specifies the transaction log prefix which is a 3 letter like E00

you have a full file path to your database following the /r which is throwing that error since it isn't expected
0
WIZU2Author Commented:
I think I have to put the database path because isn't in default folder?? Or do I just run eseutil from the folder the .edb is in?
0
Seth SimmonsSr. Systems AdministratorCommented:
you can run eseutil while the current working directory is where transaction logs are in; just specify the path to eseutil when you run it
0
WIZU2Author Commented:
Ok, I am getting confused. Below is the command I was trying to run form c:\

c:\>eseutil /r e:\exdb2\exdb2.edb /lC:\ProgramFiles\Microsoft\ExchangeServer\Mai
lbox\SecondStorageGroup /sc:\ProgramFiles\Microsoft\ExchangeServer\Mailbox\Secon
dStorageGroup

I put in the path for the system and transaction log location. From what Seth said I need to take out edb path and add the 3 digits.

c:\>eseutil /r eo1 /lC:\ProgramFiles\Microsoft\ExchangeServer\Mai
lbox\SecondStorageGroup /sc:\ProgramFiles\Microsoft\ExchangeServer\Mailbox\Secon
dStorageGroup

This is exchange 2007 server. Thanks for your help.
0
WIZU2Author Commented:
I ended up having to run eseutil /p

Afterwards it still would not mount so I then deleted all the log files, and then it mounted.

Yeah. Thanks for all your help on this.
0
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
Exchange

From novice to tech pro — start learning today.