views:

36

answers:

4

I have this requirement that i need to Update/Save all records from DatabaseA on ServerA when DatabaseB on ServerB Status is updated to FG-FRESH.

Example:

ServerB| DatabaseB

SerialNumber Status 0000001 Completed 0000002 FG-FRESH 0000003 FG-FRESH

ServerA | DatabaseA

SerialNumber Status 0000002 FG-FRESH 0000003 FG-FRESH

So if SerialNumber 0000001 is Updated to FG-FRESH on ServerB it will also be inserted to ServerA |DatabaseA just clicking a refresh Button.

I will create the application using winform in c#.

Is it Possible? I really need your Help..Thanks in Regards..

A: 

So if SerialNumber 0000001 is Updated to FG-FRESH on ServerB it will also be inserted to ServerA |DatabaseA just clicking a refresh Button.

so you want this to happen in response to a button being clicked?

RyanHennig
Yeah,Sort of...
Crimsonland
Replication, triggers, or sync framework are all great if you want this to happen automatically (usually what you want). But if you really want this to happen on a button click, then write a query in the button click event handler which queries for records with the serial number and status "FG-FRESH" and then write code to connect to the other DB and insert them there. Are you asking about the details about how to write that code?
RyanHennig
A: 

maybe an SQL trigger is what you're looking for

Here

When an insert or update happens on a table in one database, you can update another table in another database with the info.

jim
+1  A: 

What you looking for is Replication. This is the feature that allows changes on one database to be propagated to a different database. There are various flavors of replication (Merge, Transactional, Peer-to-Peer etc). Which is the right one depends on many factors, see Selecting the Appropriate Type of Replication.

Remus Rusanu
A: 

You can also use the Sync Framework. Set up the synchronization as unidirectional and use the click on the button as the trigger.

Johann Blais