Solved

Need to duplicate changes from Server A - Table A to Server B - Table B

Posted on 2011-09-20
4
196 Views
Last Modified: 2012-08-13
Hello Experts,

We have a web application which makes changes to a database table.  Lets call it Server A - Table A.  I would then like to, on the database end, mirror those changes to an identical table that lives on a different server.  Lets call it Server B - Table B.

So if a new row of data is added to Server A - Table A, I'd like Server B - Table B to be updated with the same changes.  Same if a row is updated in Server A - Table A.  A row will never be deleted so no need to worry about that.

What's the best way to do this?  Any help would be appreciated.

Thanks,
Moe
0
Comment
Question by:mauricerichard
4 Comments
 
LVL 5

Accepted Solution

by:
zvytas earned 500 total points
ID: 36567702
The best way to do something like this is using MS SQL replication. There are billions of pages about replication you can find in search engines.
Another option would be creating a trigger on Table A which updates Table B. If two databases are not on the same SQL Server, you'll need to create a linked server (again - search engines will point you to the right direction).
One caveat to have in mind with option 2 is performance, hence I would not recommend it.
0
 
LVL 2

Expert Comment

by:beridius
ID: 36567750
like zvtas said the best way is replication of tables if you are using mssql http://msdn.microsoft.com/en-us/library/ms151198.aspx  
if you are using mysql (phpmyadmin) then I would goto http://dev.mysql.com/doc/refman/5.0/en/replication.html
This method replicates the database everytime it is updated.
If you use this method make sure you use trigger so you can work out if the replication is running.

0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 36573129
Replication or log shipping is the best way to do

Other way is SSIS package to move new or updated rows to destination server.
0
 
LVL 1

Author Closing Comment

by:mauricerichard
ID: 36903683
Replication seems to be the concensus ... thanks to everyone who participated!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question