Link to home
Start Free TrialLog in
Avatar of PeterHing
PeterHingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Recovering from Exchange 2007 SCR Replication

Hi All,

I appear to have a problem - and it keeps coming back (3 times so far).

I am trying to setup SCR in our exchange environment, and am using the following link as my guide:
http://www.exchange-genie.com/2007/08/standby-continuous-replication-scr/

I can get the replication working, and see all the files populate on the standby server. The replication status is always healthy, and then it then comes for me to recover...

- I pull the Network Cable from the back of Server 1 (pretending it has died)
- Logon to Server 2 and run this command:
          Restore-StorageGroupCopy "Server1\My Storage Group" -StandbyServer Server2 -force
- Then run this command to check the health of the database:
          ESEUTIL /MH "E:\Exchange Server\Mailbox\My Storage Group\My Mailbox Database.edb"
   to be told the database is in a dirty shutdown (as expected)

* This is where it ALWAYS goes wrong *

I am then told to do a recovery of the database, so I run:
eseutil.exe /R E04 /l "D:\Exchange Logs\Mailbox\My Storage Group\Log" /S "D:\Exchange Logs\Mailbox\My Storage Group\Log" /D "E:\Exchange Server\Mailbox\My Storage Group\My Mailbox Database.edb"

to then be told:

Operation terminated with error -1216 (JET_errAttachedDatabaseMismatch, An outstanding database attachment has been detected at the start or end of recovery, but database is missing or does not match attachment info) after 1.656 seconds.

My problem is it's ALWAYS the above error. I have trashed 2 mailbox stores and tried again from scratch, and this 3rd time i've run with different names and different test mailboxes, but still get the same error at exactly the same point.

If anyone has any ideas, they will be greatly received and rewarded.
Thanks in advance,

Pete
ASKER CERTIFIED SOLUTION
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
we have to use
/8 as now in Exchange 2007 the page size is 8kb and not 4kb as it used to be earlier.
/a for arguable argument
/i to ignore anyother DB in that SG if we have.
Avatar of PeterHing

ASKER

Rancy - For the 1st time ever - the command run without error (thank you).

On a check of the database again though, it's still in a dirty shutdown state. I'm trying to avoid the Hard Recovery (because in theory I don't believe (from understanding) I should have to do one?). Correct me if I'm wrong.
Can you share the screenshots of the command and logs reqired ... also check the app logs once and see if you get 301 and then 102.
I have attached some screenshots.

I don't appear to have any 301 logs, but there are a few 102's followed straight after by 103's (see below)

102:
eseutil (9912) The database engine (8.01.0329.0000) started a new instance (0).

103:
eseutil (9912) The database engine stopped the instance (0).


Database.jpg
Logs.jpg
PShellLog.txt
DB requires logs 2-4 and the how come so many logs with DB size of 4Mb ?
Ohk run these commands and share the data with me
eseutil /ml "D:\Exchange Logs\Mailbox\My Storage Group\Logs\E04"
eseutil /ml "D:\Exchange Logs\Mailbox\My Storage Group\Logs\E04.log"
Rancy - Thanks for your help so far!

I have attached the dumps of the 2 commands. The database is only my test - it has 2 mailboxes in it, with 1 containing a copy of my mail from the last 24 hours.



Command1-.txt
Command2.txt
humm that all looks good
try this
eseutil /r e04 /l "D:\Exchange Logs\Mailbox\My Storage Group\Logs" /d "E:\Exchange Server\Mailbox\My Storage Group" /a /8
It errored, so had to doctor what you asked with the /s switch - But it's still dirty.

[PS] C:\Program Files\Microsoft\Exchange Server\Bin>eseutil /r e04 /l "D:\Exchange Logs\Mailbox\My Storage Group\Log" /S  D:\Exchange Logs\Mailbox\My Storage Group\Log" /d "E:\Exchange Server\Mailbox\My Storage Group" /a /8

Initiating RECOVERY mode...
    Logfile base name: e04
    Log files: D:\Exchange Logs\Mailbox\My Storage Group\Log
    System files: D:\Exchange Logs\Mailbox\My Storage Group\Log
    Database Directory: E:\Exchange Server\Mailbox\My Storage Group

Performing soft recovery...
Operation completed successfully in 0.47 seconds.


I'm wondering if it's worth starting over again, but either
- Having the System Files with the database?   or
- Having the logs and database all together on the same drive?
The issue is that the Soft recovery does not end so quickly it would take a few seconds.
ok - I'm gonna start it again - with exactly the same setup, let it replicate and run overnight (UK), and see if I can do it with your command (mentioned at the start) straight off first thing.

I shall let you know what happens. Thanks for your time so far today - It's much appreciated!
Your welcome.... and would wait for your update !!
Hi Rancy - Hope all is well and that you're around!

To confirm the steps i'm about to take:
- Pull the cable from Server1
- on Server2 run the following
  • Restore-StorageGroupCopy "Server1\My Storage Group" -StandbyMachine Server2 -force
  • ESEUTIL /MH "E:\Exchange Server\Mailbox\My Storage Group\My Mailbox Database.edb"
(check status is dirty)
  • ESEUTIL e04 /l "folder location of the log files" /s "folder location of the system files" /d "folder location of the DB file" /8 /a /i
Would you agree?
It Worked! Like a dream!

It must have been my initial command (before raising this ticket) that did something to the database that didn't allow us to successfully troubleshoot yesterday. Starting again and using the /8 switch did it.
Cool .... so you did it man !!!!!  
Yeah /8 and /a plays a big role.
Thanks again so much for your time and effort in trying to solve this with me. If it didn't work today, I was going to use up one of our valuable Microsoft Support Tickets - and your initial answer saved me from doing so. If I could give more than 500 points, I would! I'm sure we'll meet again in the Exchange world soon! Pete