Mirroring: revert principal database from snapshot

  • I have to run a script against a database, and my usual backout strategy would be to take a database snapshot and revert the database from it in case something goes wrong.

    This time, however, the database has the principal role in a mirroring session, and I don't know what could happen to the mirror if I revert the database from a snapshot. Does anyone here have experience with that?

    I am thinking that the mirroring session would break, but I don't know for sure. Meanwhile, I will just play on the safe side and take a backup before running the script. Anyway, your insights will be much appreciated.

    PS: I am planning to recreate the scenario later this week in a sandbox to see what happens. I will post my results when I have them.

  • F. Dwarf (12/5/2012)


    I have to run a script against a database, and my usual backout strategy would be to take a database snapshot and revert the database from it in case something goes wrong.

    This time, however, the database has the principal role in a mirroring session, and I don't know what could happen to the mirror if I revert the database from a snapshot. Does anyone here have experience with that?

    I am thinking that the mirroring session would break, but I don't know for sure. Meanwhile, I will just play on the safe side and take a backup before running the script. Anyway, your insights will be much appreciated.

    PS: I am planning to recreate the scenario later this week in a sandbox to see what happens. I will post my results when I have them.

    does your apply script not come with a backout script?

    If not, why not?

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks for responding, Perry.

    Well, the developers didn't bother creating a backout script :ermm:

    Why? It's not relevant at this point.

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

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