After breaking mirror, the mirrored database is in restoring state

  • Hi,

    I mirrored one database in high protection mode. When I break the mirror by click Stop Mirroring within the the database Properties, Mirroring page for the principal database, I got a message on the mirror server read "The database 'xyz' is marked RESTORING and is in a state that does not allow recovery to be run."

    Later on, I managed to restore the tail log from the principal database to bring the "mirrored" database on line.

    Anything did I do wrong?

    Thanks,

    -Yuemo

  • Why did you choose to stop Mirroring? Were you trying to backup the Mirrored database?

    When you stop mirroring, the databases can get out of sync. The only way to bring the databases to a consistent state is to restore from the latest backups of the principal server, which you did with the transaction log backups.

  • Well, we were trying disaster recovery test to simulate one server down.

    So if the principal is down, how to make mirror into production?

    Thanks,

    -Yuemo

  • [font="Verdana"]In high protection or high performance mode if the principal server is down then your mirror db will be in restoring state. Now inorder to make the mirror db as principal you need to connect to the mirror server and type the following command to perform manual failover,

    Alter database mirrordbname set partner force_service_allow_data_loss

    that will bring the mirror db online and you can work on it !

    hope this helps

    [font="Verdana"]- Deepak[/font]

  • Thanks, that makes sense!

    I re-read the section of mirroring. I missed that part.

    Our application is not suitable to failover automatically. This is why I did not add the witness, as I though we have to break the mirror manually anyway.

    It looks like having a witness will be better.

    Thanks again!

    -Yuemo

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

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