Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Change of role between Primary and Secondary Database Expand / Collapse
Author
Message
Posted Monday, October 22, 2012 1:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 15, 2013 11:37 PM
Points: 2, Visits: 99
We need to have a database in two SQL Servers one at Mumbai and another at Houston and both the database should be in sync.

In the morning the Mumbai DB will be primary and Houston will be secondary (read-only) so that users at Mumbai will connect to the primary.
In the evening the Mumbai DB will be secondary (read-only) and Houston DB will be Primary so that Houston users will connect to the primary.

So that at any time only one database will be available for any DML operation to avoid any conflict and user access to the DB for respective location will be fast.

Which HA solution can be considered for this scenario.
Post #1375279
Posted Monday, October 22, 2012 2:31 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Yesterday @ 11:07 AM
Points: 710, Visits: 1,452
You may want to look at replication solutions, but you are still going to have to identify a way to identify and resolve potential conflicts. Take a look at merge replication, transactional replication with subscriber updates and peer-to-peer replication.

Joie Andrew
"Since 1982"
Post #1375303
Posted Monday, October 22, 2012 2:41 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 15, 2013 11:37 PM
Points: 2, Visits: 99
Thanks Joie, I had tried peer-to-peer replication but here all the nodes are available for read-write and conflict resolution is based on peer id.

Merger replication will add an id field in all the tables, since its an application database so cannot take the risk of it (future application/db updates may delete the id field, guessing).

In any way can we change the roles of a database to primary-to-seconday and secondary-to-primary based on time (secondary will be read-only) so that no management or monitoring will be needed for conflict resolution.
Post #1375306
Posted Monday, October 22, 2012 2:45 AM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Yesterday @ 11:07 AM
Points: 710, Visits: 1,452
Then you are looking at either database mirroring, log shipping or a 3rd party app that can do what you need. If your storage sub-system can handle the replication you may be able to have a geo-cluster that can do what you need.

In all of these scenarios though you will need to have an accepted outage everytime you need to fail the primary over to the secondary and vise-versa.


Joie Andrew
"Since 1982"
Post #1375307
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse