Exchange Database fails to mount

Hi,
 
 I have SBS2011/Exchange 2010 Server  that lost power and the server was turned off.
 When it came back on, the exchange database failed to mount (although public database was mounted).
(1) When I ran ESEUTIL /MH “Mailbox Database.edb”, it showed "State: Dirty Shutdown".
(2) When I ran ESEUTIL /G "Mailbox Database.edb", it said "Checking database integrity.

The database is not up-to-date. This operation may find that this database is corrupt because data from the log files has yet to be placed in the database. To ensure the database is up-to-date please use the 'Recovery' operation. Operation terminated with error -550 (JET_errDatabaseDirtyShutdown, Database was not shutdown cleanly. Recovery must first be run to properly complete database operations for the previous shutdown.)

(3) When I ran Eseutil /ml “C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\e00”,
 it said "No damaged log files were found."
(4) When I ran ESEUTIL /r E00 /l “C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database” /d “C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database”, I got:

Initiating RECOVERY mode...
    Logfile base name: E00
            Log files: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database
         System files: <current directory>
   Database Directory: C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database

Performing soft recovery...
                      Restore Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ......................X
Operation terminated with error -1019 (JET_errPageNotInitialized, Blank database page) after 3.625 seconds.

(5) When I ran ESEUTIL /p “C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database”,  I get the following error.

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

(6) I rebooted the server a couple of times, but to no avail.

I googled the subject "Cannot access file, the file is locked or in use" and found this:

1.  Recycle the Information Store Services
2.  Make the disk hosting the database offline from diskmanagement.msc and then bring it on line . This would release the lock on the database
 3. Verify if the database is in cleanshutdown state (eseutil /mh databasename). If the database is in dirty 4. shutdown state, run eseutil /r E01(Log file prefix) /l logfile path to replay the log files and make sure the database is in clean shutdown state
5. Mount-database <databasename> if the mount fails Proceed step 5
 6. Disable/Uninstall the antivirus on the server / Verify the AV exclusions
7. hange the log folder name and try mounting the database
8.  If you are not able to change log folder name, Download Procmon and check process locking the log file path
9.  Change the Database Log folder Path and try mounting the database
10. Reboot the server

I am not sure if I should follow the tips above. Can you help?
LVL 1
sgleeAsked:
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.

Ranjithkumar RajangamCommented:
Health of the Database

eseutil /mh "database name"

If the state is in clean shutdown, move all the log files from the Transaction logs folder location and then mount the stores.

If the state is in Dirty shutdown,check if the log files that is indicated as Logs required is available or now.

Dirty Shutdown,

Check all the log files is in clean state, using eseutil /ml "Path of the log file"

If log files are Healthy, Try soft recovery

eseutil /r <Log Prefix> /l “Path of the log files” /d “Path of the database”

In case getting error - 1216 , just try adding the "/i" switch at the end.

Before adding /i try to look out the event log - Event ID - 494 and any mispath found,

eseutil /R logfile /l “c:\recoverydirectory” /s “c:\recoverydirectory” /d “c:\recoverydirectory”

Once command runs successfully mount the stores.

eseutil command - using /P for a repair to get the database into a clean shutdown. Using eseutil /P may lead to data loss.
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
sgleeAuthor Commented:
I have done all that. The error message is "Cannot access file, the file is locked or in use".
0
Ranjithkumar RajangamCommented:
Is that mailbox database you want to verify /mh is mounted?

To run eseutil, make sure the information store is stopped. If you cannot stop Information Store then dismount the particular mailbox database and copy to separate server, copy BIN folder to that server as well.

Then try to run eseutil from the separate server.

Once it completes, move back to original location.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

sgleeAuthor Commented:
Mailbox database is not mounted. In fact it will not mount.
I did not stop exchange Information store service before running ESEUTIL commands. Let me try the command after stopping Information Store Service.
0
sgleeAuthor Commented:
I stopped "Microsoft Exchange Information Store service". The mailbox database fails to mount (so no need to dismount).
The result is the same.

[PS] C:\Program Files\Microsoft\Exchange Server\V14\Bin>eseutil /p "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database"

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

Error: Access to source database 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database' failed with J
et error -1032.

Operation terminated with error -1032 (JET_errFileAccessDenied, Cannot access file, the file is locked or in use) after
20.31 seconds.
0
sgleeAuthor Commented:
I can't move the mailbox database to another server at this point due to its size.
0
Ranjithkumar RajangamCommented:
Ok, could you try copying the database to separate server, copy BIN folder to that server as well.

Then try to run eseutil from the separate server and check the state.
0
sgleeAuthor Commented:
"could you try copying the database to separate server, copy BIN folder to that server as well." --> I can't do that at this point due to the size (13GB). I need to go to onsite and copy them onto flash drive and bring it back to my SBS server.
But again I can't do that right at the moment. Maybe this Friday.

Is there any way to unlock this mailbox database?
0
Ranjithkumar RajangamCommented:
Is any backup exec or AV locking the file? Could you check which program is currently locking the file?
0
sgleeAuthor Commented:
I have webroot anti-virus program running. No backup exec. I do Windows Server backup every Saturdays.
I can't imagine Webroot locking up exchange database file ...
Let me stop it anyway.
1
sgleeAuthor Commented:
I stopped webroot and ran
eseutil /p "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database"
but the same error:
Error: Access to source database 'C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database' failed with
et error -1032.

Operation terminated with error -1032 (JET_errFileAccessDenied, Cannot access file, the file is locked or in use) after
20.31 seconds.
1
sgleeAuthor Commented:
I am going to check back in the morning to see if there are more comments about this error.
0
MAS (MVE)EE Solution Guide - Technical Dept HeadCommented:
Hi sglee,
Please check Exchange database file is excluded from scanning or real time protection.
Please check the health of the database.http://www.exchangerecover.com/blog/how-to-recover-exchange-database-from-dirty-shutdown.html
0
sgleeAuthor Commented:
@MAS
"Please check Exchange database file is excluded from scanning or real time protection. " -->  Please see ID: 42096528 & ID: 42096545 above.
0
sgleeAuthor Commented:
Finally I got the database repaired successfully.

When I ran Eseutil /p "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb", as usual, I got the following warning. This is where I resorted "Recovery" eseutil commands in the past. But today I decided to ignore the suggestion and let it run the repair.

"The database is not up-to-date. This operation may find that
this database is corrupt because data from the log files has
yet to be placed in the database.

To ensure the database is up-to-date please use the 'Recovery' operation"
0
MAS (MVE)EE Solution Guide - Technical Dept HeadCommented:
@sglee,
Glad to know you fixed it.
Appreciate if you share the command you used to fix the database for future help.

Thanks
MAS
0
sgleeAuthor Commented:
@MAS
I ran Eseutil /p "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb". As usual, I got the following warning.

"The database is not up-to-date. This operation may find that
this database is corrupt because data from the log files has
yet to be placed in the database.

To ensure the database is up-to-date please use the 'Recovery' operation"

But this time I decided to ignore the warning and let it run the repair.
0
MAS (MVE)EE Solution Guide - Technical Dept HeadCommented:
Thanks for sharing the solution.
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.