Restoring a mirrored database to a different server. Why does it occasionally fail?

  • This is something we've just put up with for a couple of years, but my curiosity got the best of me today. Every once in a while a scheduled restore of a production database backup to a development server will fail with the following error.

    RESTORE cannot operate on database 'XXX' because it is configured for database mirroring or has joined an availability group

    While it is true the production database is involved in database mirroring, the development server does not have database mirroring enabled. This error tells me something within the backup is telling the development server the database is configured for database mirroring. However the perplexing part for me is that we only receive this error maybe 5% of the time, if that, and only on a couple of our databases. We have numerous other restores of mirrored production databases to development servers that have never produced this error. So my question is what is causing this error to occur, and why is it not happening all of the time? We get around this error by deleting the DEV database and re-running the restore job.

    Thanks, Dave

  • Hey Dave - Did you ever figure this out?

  • Never seen this before. But I think it could be worthwhile to run dbcc traceon(3604) dbcc dbtable('<db_name>'), save the results, and compare with successes.

  • Could it be that once you've restored it someone runs something that does an ALTER DATABASE to turn mirroring on the dev db?

    Otherwise, I'm not sure. This shouldn't be an issue. Was DBM ever on the dev server?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply