如何将所有最近的行从db更新到远程db [英] how to update all the recent rows from the db to remote db
本文介绍了如何将所有最近的行从db更新到远程db的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在本地数据库中有一个名为A的表,它有2行。
TableA
ID | 名称 |
1 | X |
2 | Y |
我的远程数据库表有3行相同的结构
TableB
ID | 名称 |
1 | X |
2 | Y |
3 | Z |
我的问题是当我在tableA中插入2个新行时,当互联网可用或点击按钮时(无论哪个可能),它必须在远程数据库中插入2个新行作为表B.我需要在没有循环的情况下这样做,因为新的交易很大,如每天10000。我有失业的风险,请帮忙。
I have a table inside local db called A which have 2 rows.
TableA
ID | Name |
1 | X |
2 | Y |
and my remote db table has 3 rows with same structure
TableB
ID | Name |
1 | X |
2 | Y |
3 | Z |
My problem is when i am inserting 2 new rows in tableA, then it must insert the 2 new rows in remote db as table B when the internet is available or when button clicked(whichever possible). I need to do this without loop as the new transactions are huge like 10000 per day. I have a risk of jobless, please help.
推荐答案
你应该看看 SQL Server复制 [ ^ ]。
这允许两个数据库之间的正确同步,无论记录是否已经插入,删除或修改。
希望这有帮助。
You should have a look at SQL Server Replication[^].
This allows the correct synchronization between both database, whether records have been inserted, deleted, or modified.
Hope this helps.
这篇关于如何将所有最近的行从db更新到远程db的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文