Solved

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

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now