Database Mirroring scenario

  • Hi,

    I just wanted to know what would happen in the scenario where you've got database mirroring configured over a WAN and one site goes down and loses connection with the other site.

    The failover takes place and the mirrored DB now becomes the Principal DB.

    However, the site where the mirrored DB should now be is still down.

    Will DB mirroring and the Principal DB continue to run if it has no mirror?

    If so, then can users make changes to the principal DB and query it as normal?

    Thanks.

  • The failover takes place and the mirrored DB now becomes the Principal DB.

    For automatic failover to happen, a witness server is needed and a connection should exist between Witness & Mirror.

    Will DB mirroring and the Principal DB continue to run if it has no mirror?

    Yes it will continue. But the TLog will grow at the Primary as the transactions can't be truncated until they get committed at the Mirror.

    So in this scenario, there is a problem of Log file filling the disk space and DB getting unavailable.

    If so, then can users make changes to the principal DB and query it as normal?

    Yes then can.

    --

    SQLBuddy

  • zedtec (3/13/2014)


    Hi,

    I just wanted to know what would happen in the scenario where you've got database mirroring configured over a WAN and one site goes down and loses connection with the other site.

    do you have a witness configured and which site does it reside on?

    zedtec (3/13/2014)


    The failover takes place and the mirrored DB now becomes the Principal DB.

    However, the site where the mirrored DB should now be is still down.

    Will DB mirroring and the Principal DB continue to run if it has no mirror?

    If so, then can users make changes to the principal DB and query it as normal?

    Thanks.

    If i'm right you're saying your principal goes down and the mirror becomes the new principal. The old principal cannot act as mirror as it's down.

    You're asking, Will the new principal function ok and will the mirroring session still be configured.

    The new principal would be online and accessible to users. As soon as the old principal comes back it will rejoin the mirror session as the new mirror and the session will be marked suspended. To continue you'll need to resume the session using the following command from the new principal

    alter database [yourdb] set partner resume

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

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

  • Thanks for your replies, that's clarified it.

  • Do not club concept of Logshipping with Mirroring. Refer the following MS link for better understanding:

    http://technet.microsoft.com/en-us/library/ms189852.aspx

    HTH

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • In relation to this, what happens if one of the site's goes down (i.e - the principal site) and automatic failover is not being used (i.e. - there is no witness server).

    In this case, how would manual failover be done on the principal server if the entire server is down/disconnected from the mirror server?

    If failover is not done manually and automatic failover cannot be done anyway then what happens with mirroring?

    Does it continue running?

    Also what happens to the mirrored databases? I'm assuming they remain as mirrored and therefore inaccessible by users?

    Thanks.

  • zedtec (3/18/2014)


    In relation to this, what happens if one of the site's goes down (i.e - the principal site) and automatic failover is not being used (i.e. - there is no witness server).

    In this case, how would manual failover be done on the principal server if the entire server is down/disconnected from the mirror server?

    If failover is not done manually and automatic failover cannot be done anyway then what happens with mirroring?

    Does it continue running?

    Also what happens to the mirrored databases? I'm assuming they remain as mirrored and therefore inaccessible by users?

    Thanks.

    In this Scenario you can force the Mirror to become Primary. But there is a possibility of Data Loss.

    You can run this command ..

    ALTER DATABASE <databasename> SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

    Check this for better understanding\consequences ..

    http://technet.microsoft.com/en-us/library/ms189850.aspx

    --

    SQLBuddy

  • Ok thanks I'll have a read.

  • zedtec (3/18/2014)


    In relation to this, what happens if one of the site's goes down (i.e - the principal site) and automatic failover is not being used (i.e. - there is no witness server).

    Sqlbuddy covered this force service on the mirror

    zedtec (3/18/2014)


    In this case, how would manual failover be done on the principal

    You seem to be getting awfully confused here, based on the above, dont you mean mirror?

    zedtec (3/18/2014)


    If failover is not done manually and automatic failover cannot be done anyway then what happens with mirroring?

    Does it continue running?

    Also what happens to the mirrored databases? I'm assuming they remain as mirrored and therefore inaccessible by users?

    Thanks.

    the mirror session meta is still present until you remove it

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

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

  • Hi Perry,

    No confusion.....Failover is performed at the principal server isn't it?

    If the principal is down then how would failover take place?

    That was my question in a nutshell.

  • zedtec (3/19/2014)


    Hi Perry,

    No confusion.....Failover is performed at the principal server isn't it?

    No, not when the principal is dead as you quoted in your scenario above. In this case you would use the following from the mirror to bring the mirror database online

    ALTER DATABASE [somehadb] SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

    zedtec (3/19/2014)


    If the principal is down then how would failover take place?

    That was my question in a nutshell.

    see above

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

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

  • Yes you would use that and I know that now, but when I asked this question I didn't know about Forced Service.

    That's why I asked about failover from principal as I didn't know you could do forced service on the mirror.

  • you know now 😉

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

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

Viewing 13 posts - 1 through 12 (of 12 total)

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