Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top