如何同步2个数据库表

如何同步2个数据库表

本文介绍了如何同步2个数据库表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在2台服务器上有2个数据库,但在表中相同



在数据库A(带有静态IP的云服务器)中插入table1使用我的本地应用程序在DB B中(在没有静态IP的本地服务器中)插入table2和/或
现在我需要编写一些代码来同步我在本地c#应用程序中单击sysn按钮时的那些



同步说明:



DB_A.table1 DB_B.table1

AND

DB_A.table2使用DB_B.table2



(从A.tb1获取并插入B.tb1并从B.table2获取并插入在A.tb1)



请帮帮我怎么办?



问候

HiI have 2 database in 2 servers but same in tables

inserting in table1 in database A (cloud server with static IP) with my website and inserting table2 in DB B (in local server without static IP) with my local application
now i need to write some code to sync those when in click sysn button in my local c# application

sync description:

DB_A.table1 With DB_B.table1
AND
DB_A.table2 With DB_B.table2

(Get from A.tb1 and insert in to B.tb1 and Get from B.table2 and insert in A.tb1 )

please help me how can i do that?

regards

推荐答案


这篇关于如何同步2个数据库表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 19:27