database-replication

multiple Postgres clusters (not instances) on 2 machines

ぐ巨炮叔叔 提交于 2019-12-25 00:38:01
问题 I am trying to setup (half way done already) 2 Postgres clusters, say prod and test (not instances) on 2 machines say .114 and .115. One cluster has 2 instances. Each instance runs on each of machines. I am trying to make .114 as primary for test cluster while .115 will work as secondary for it. For prod cluster .115 will work as primary and .114 as secondary. Although it sounds not-good that i have test and prod on same machines but this is what customer needs now. I have already setup test

How to replicate two tables with different structures but the same fields?

倖福魔咒の 提交于 2019-12-24 23:38:04
问题 I have two SQL server databases in different locations.I want to do something like replication. this is my scenario: In the first data base I have a table with following structure: tbl_worker _Name nvarchar(10) family nvarchar(20) State int city int and in second data base I have following table: tbl_employee _Name nvarchar(20) family nvarchar(15) Address nvarchar(30) Tell nvarchar(14) State int city int as you see the structure of my tables in two different data bases are not the same. but I

Why do MongoDB docs recommend/insist on specific replica set priority configurations

有些话、适合烂在心里 提交于 2019-12-24 20:08:55
问题 http://docs.mongodb.org/manual/tutorial/deploy-geographically-distributed-replica-set/ I'm particularly curious as to why they generally want replicas in the non-primary data centre to be priority 0 for elections? If one data centre goes down, I want to be able to failover to (one of) the replica(s) in another data centre. The documentation seems to insist that secondary replicas in a different data centre from the primary should be priority 0, and thusn ineligible for primary status in case

Mysql Master Master Replication

折月煮酒 提交于 2019-12-24 04:28:10
问题 Server1: xxx.xxx.xxx.xxx server-id=1 binlog-do-db=sample master-host = xxx.xxx.xxx.xxx master-user = someuser master-password = somepassword master-connect-retry = 60 relay-log = /var/lib/mysql/slave-relay.log relay-log-index = /var/lib/mysql/slave-relay-log.index Server 2: xxx.xxx.xxx.xxx server-id=2 binlog-do-db = sample master-host = xxx.xxx.xxx.xxx master-user = someuser master-password = somepassword master-connect-retry = 60 relay-log = /var/lib/mysql/slave-relay.log relay-log-index =

How to get replication status from code

孤街醉人 提交于 2019-12-24 01:46:12
问题 I have done replication on my SQL Server 2005 database. Now i want to show the status from my GUI.(Can be C# or else) Is there is any method or API by which i can monitor the status of replication. This is for client confirmation that replication is working. Thanks Way something like this. http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-replication/11698/How-to-get-the-replication-status-using-RMO-in 回答1: A great option is this: How to Programmatically Monitor Replication (via T-SQL):

mongodb: how to check which node I connected on replicaSet

回眸只為那壹抹淺笑 提交于 2019-12-24 00:48:46
问题 I configured 3 machines with MongoDB ReplicaSet, and all is working great, I can connect to them, one of them dies and the remaining keep working, it is fine. I connect with the URI: hostname1,hostname2,hostname3/?readPreference=secondary , then I make some queries and they are working as well, but I want to check if this connection is really querying from the secondary node. How can I check this? Should I just trust that this is being done this way?, I also was checking the logs on the

MonogoDB Replica Set Status Not changing from Startup to Secondary

最后都变了- 提交于 2019-12-23 21:39:58
问题 I have setup a MongoDB replica set with 3 nodes(vm's running CentOS). One node became Primary other 2 stuck in Startup. When these 2 nodes will change their states from startup to secondary. aryabhata:PRIMARY> rs.status() { "set" : "aryabhata", "date" : ISODate("2016-04-30T08:10:45.173Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "localhost.localdomain:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 69091, "optime" : Timestamp(1461935462, 1), "optimeDate" :

offline limited multi-master in Postgres

人盡茶涼 提交于 2019-12-23 20:33:31
问题 Site A will be generating a set of records. Nightly they will backup their database and ftp it to Site B. Site B will not be modifying those records at all, but will be adding more records and other tables will be creating FK's to Site A's records. So, essentially, I need to setup a system to take all the incremental changes from Site A's dump (mostly inserts and updates, but some deletes possible) and apply them at Site B. At this point, we're using Postgres 8.3, but could upgrade if

Android - Couchbase lite - pull with filter - Replication.setFilter

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 12:58:50
问题 I'm working on a android messagerie app, messages are stored in a CouchDB(Apache) database on the internet. How can I pull messages with filter on my Android devices? Android Snippet: Replication pull = new Replication(messageDB, messageUrl, Replication.Direction.PULL); //filter pull.setFilter("message/by_username"); HashMap<String, Object> filterParams = new HashMap<>(); filterParams.put("username", usr); pull.setFilterParams(filterParams); pull.setContinuous(false); //oneshot pull.start();

django database routing with transactions

亡梦爱人 提交于 2019-12-23 09:31:45
问题 Referring to the example in Django documentation for multiple databases in one application, https://docs.djangoproject.com/en/dev/topics/db/multi-db/#an-example " It also doesn’t consider the interaction of transactions with the database utilization strategy. " How do I handle the interaction stated above. The scenario is this: I am using postgresql as my database. I have setup up a replica and want all the reads to "auth" tables to go to replica. Following the documentation I wrote a