1

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..

Crimsonland
  • 2,194
  • 3
  • 24
  • 42

4 Answers4

1

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
  • 288,378
  • 40
  • 442
  • 569
0

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
  • 1,072
  • 9
  • 12
  • 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 Oct 09 '10 at 23:39
0

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.

Community
  • 1
  • 1
jim
  • 26,598
  • 13
  • 51
  • 66
0

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
  • 9,389
  • 6
  • 45
  • 65