Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm using SQL Server 2008R2. Last night, the host machine on which my mirror database was running basically went belly up. Thankfully the principle database was on a different host server and so was fine. However...

The principle is working but says suspended. When i try to resume the mirroring, I get an error in the SQL error log giving an error number of 9004.

A quick Google of this error number come back with this article. (tl;dr: transaction log is damaged)

So, does this mean that the transaction log shipping between the principle and the mirror has somehow got screwed up? How do I fix this?

Is it as simple as doing a full backup on the principle and a full transaction log, then restoring them both on the mirror database with norecovery switch on and then set up the mirroring again?

Or will I need to do something more drastic?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The likely issue is that the principal has had log backups performed since the mirroring session was paused and it cannot catch up, so re-initializing the mirror with a full and log backup should fix the problem. First you will need to remove the mirroring from both servers with:

alter database [mydb] set partner off

Then restore the full and log backup with NORECOVERY and re-run through the mirroring wizard.

share|improve this answer
    
I figured as much, but just wanted to check in case I screwed things up. All working as it should now. Thanks. –  Piers Karsenbarg Jan 17 '12 at 23:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.