Solved

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

Posted on 2011-09-20
4
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

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.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

630 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