database-replication

Pause SQL server replication temporarily

安稳与你 提交于 2019-11-30 15:55:14
问题 We have a transactional replication setup using 3 SQL Servers, 1st as publisher, 2nd as distributor, and 3rd as subscriber. We have an activity to change the location of the replicated DB (subscriber) using de-attach and attach method. During this activity, I will need to stop the SQL server and hence all replicated transactions will fail. What's the proper way to pause the replication during this activity, so when I attach the DB again and start the SQL service, replication will resume

Pause SQL server replication temporarily

≡放荡痞女 提交于 2019-11-30 14:57:42
We have a transactional replication setup using 3 SQL Servers, 1st as publisher, 2nd as distributor, and 3rd as subscriber. We have an activity to change the location of the replicated DB (subscriber) using de-attach and attach method. During this activity, I will need to stop the SQL server and hence all replicated transactions will fail. What's the proper way to pause the replication during this activity, so when I attach the DB again and start the SQL service, replication will resume normally. Thanks Please see the following link for details of how to accomplish this: Start and Stop a

How to resolve conflicts with continuous replication

梦想的初衷 提交于 2019-11-30 06:26:00
问题 I'm new to both CouchDB and PouchDB and am using it to create a contact management system that syncs across mobile and desktop devices, and can be used offline. I am seeing that using PouchDB is infinitely easier than having to write a PHP/MySQL backend. I have been using it successfully, and when I make conflicting changes on offline devices, CouchDB uses an algorithm to arbitrarily pick a winner and then correctly pushes it to all the devices. What I would like to do is implement a custom

Replicate Microsoft SQL to other databases

爱⌒轻易说出口 提交于 2019-11-29 00:21:51
I'd like to be able to replicate an entire database from Microsoft SQL to another web friendly database such as CouchDB or even mySQL. I'd need to do replication daily and was just wondering if it's possible and if so, how would I do it with the least amount of coding. Thanks It's possible with SymmetricDS , an open source solution that can replicate changes between different databases, like SQL-Server and MySQL. Some features are: Uses change data capture and continuous synchronization Low-bandwidth transfer over web-based protocols Asynchronous operation in the background Recovers

How to resolve conflicts with continuous replication

佐手、 提交于 2019-11-28 18:27:20
I'm new to both CouchDB and PouchDB and am using it to create a contact management system that syncs across mobile and desktop devices, and can be used offline. I am seeing that using PouchDB is infinitely easier than having to write a PHP/MySQL backend. I have been using it successfully, and when I make conflicting changes on offline devices, CouchDB uses an algorithm to arbitrarily pick a winner and then correctly pushes it to all the devices. What I would like to do is implement a custom algorithm to merge conflicting records. Here is the algorithm I would like to use: If a record is

How to code PHP MySQL class for master and slave setup?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 13:01:28
I have never used a master/slave setup for my mysql databases so please forgive if I make no sense here. I am curious, let's say I want to have a master DB and 3 slave DB's. Would I need to write my database classes to connect and add/update/delete entries to the master DB or is this automated somehow? Also for my SELECT queries, would I need to code it to randomly select a random DB server? What you want to use (and research) is MySQL Replication . This is handled completely independent of your code. You work with the database the same as if there were 1 or 100 servers. you sound like you are

Replicate Microsoft SQL to other databases

南楼画角 提交于 2019-11-27 15:19:17
问题 I'd like to be able to replicate an entire database from Microsoft SQL to another web friendly database such as CouchDB or even mySQL. I'd need to do replication daily and was just wondering if it's possible and if so, how would I do it with the least amount of coding. Thanks 回答1: It's possible with SymmetricDS, an open source solution that can replicate changes between different databases, like SQL-Server and MySQL. Some features are: Uses change data capture and continuous synchronization

How to code PHP MySQL class for master and slave setup?

非 Y 不嫁゛ 提交于 2019-11-27 07:28:57
问题 I have never used a master/slave setup for my mysql databases so please forgive if I make no sense here. I am curious, let's say I want to have a master DB and 3 slave DB's. Would I need to write my database classes to connect and add/update/delete entries to the master DB or is this automated somehow? Also for my SELECT queries, would I need to code it to randomly select a random DB server? 回答1: What you want to use (and research) is MySQL Replication. This is handled completely independent

MySQL Replication

孤街醉人 提交于 2019-11-27 04:39:11
Shall I use MySQL replication to synchronize a local database and a remote database? If so, how do I setup both master and slave? Are there any other methods available to do this? how to setup master/slave? This Replication: How to guide has both what you need to do on the master and the slave. any other methods available to do this There is also Multi-Master and Circular Replication for MySQL Cluster. Full chapter on replication: http://oreilly.com/catalog/hpmysql/chapter/ch07.pdf and also very detailed here: http://downloads.mysql.com/docs/mysql-replication-excerpt-5.1-en.a4.pdf Gopu If you

SQL Server Update Trigger, Get Only modified fields

人走茶凉 提交于 2019-11-27 03:51:53
I am aware of COLUMNS_UPDATED , well I need some quick shortcut (if anyone has made, I am already making one, but if anyone can save my time, I will appriciate it) I need basicaly an XML of only updated column values, I need this for replication purpose. SELECT * FROM inserted gives me each column, but I need only updated ones. something like following... CREATE TRIGGER DBCustomers_Insert ON DBCustomers AFTER UPDATE AS BEGIN DECLARE @sql as NVARCHAR(1024); SET @sql = 'SELECT '; I NEED HELP FOR FOLLOWING LINE ...., I can manually write every column, but I need an automated routin which can work