Solved

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

Posted on 2011-09-20
4
193 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL date incremented 11 31
Trying to get a Linked Server to Oracle DB working 21 60
SQL Count issue 24 17
Job - date manual 1 23
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…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

832 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