SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Change of role between Primary and Secondary Database


Change of role between Primary and Secondary Database

Author
Message
manoj.k.pradhan
manoj.k.pradhan
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 102
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.
Joie Andrew
Joie Andrew
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2313 Visits: 2032
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"
manoj.k.pradhan
manoj.k.pradhan
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 102
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.
Joie Andrew
Joie Andrew
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2313 Visits: 2032
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"
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search