SQL Mirror failover failback

  • Hi,

    I'm setting up a SQL2008 R2 mirroring for a production environment.

    At the moment we have configured a test env with two sql 2008 R2 instances on two different servers.

    Since I'm new on this I have the following questions on failover/failback:

    - we have made a configruation with witness so I suppose that if I take down the MIRRORED DATABASE on the principal the target should become active automatically.

    How do clients connection be redirected ? Do I need to change the connection strings ?

    - How do I failback ?

    thanks for the help

    SC

  • Hi SC,

    I recommend you take a look at the series of posts on Jose Barreto's blog in which he discusses SQL2008, they are not new (I found it stumbling around the web) but they seem to provide useful information. For example,

    he deals with the issues you were inquiring about, including the combination of database mirroring with failover clustering as well as failover and failover processes.

    I found it pretty helpful, hope you do to 🙂

    Natatali

    "Press any key to continue, where's the ANY key?" 😛 Homer Simpson

  • Hi,

    sc_2111 (4/18/2012)


    Hi,

    - we have made a configruation with witness so I suppose that if I take down the MIRRORED DATABASE on the principal the target should become active automatically.

    Yes, if you're using Full Safety mode, with Automatic Failover.

    How do clients connection be redirected ? Do I need to change the connection strings ?

    Yes, you need to add a Failover Partner option into the connection strings. The exact option name depends on the type of connection.

    ConnectionStrings.com will help you out here.

    Also, MS recommend connecting via TCP rather than Named Pipes when using mirroring.

    - How do I failback ?

    This depends on what exactly has happened, and the state of the mirror partners.

    But at it's simplest, and if they're synchronised, you run "ALTER DATABASE dbname SET PARTNER FAILOVER" on whichever is currently the mirror server, for each db you need to.

    Just another thing - if you haven't already done this, you need to consider ways to keep non-mirrored things like Logins & Jobs synchronised between the two servers.

    Cheers

  • already answered at this link

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

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

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

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