简体   繁体   English

SQL Server 合并来自同一 Azure SQL SERVER 的不同 Azure SQL 数据库中的两个表

[英]SQL Server Merge with two tables from different azure SQL Database from same Azure SQL SERVER

I need to merge with 2 different tables from 2 different azure SQL databases where as these two azure sql database are from same azure sql server.我需要与来自 2 个不同 azure SQL 数据库的 2 个不同表合并,因为这两个 azure sql 数据库来自同一个 azure sql server。

also for performance imporvement purpose, what I need to do is bulk insert and/or bulk update.同样出于性能改进目的,我需要做的是批量插入和/或批量更新。 also, this will be continous activity.此外,这将是持续的活动。 for very first time I have to merge all data which is huge.我第一次必须合并所有巨大的数据。 and then whenever respective topic recivies message, I need to add/update that single record only.然后每当相应的主题收到消息时,我只需要添加/更新该单个记录。

what are the different options to do the same.做同样的事情有哪些不同的选择。 for both processes.对于这两个过程。

please help.请帮忙。 thanks.谢谢。

You can use Azure SQL Data Sync to merge those tables located on 2 different databases into a third and new database.可以使用 Azure SQL 数据同步将位于 2 个不同数据库上的这些表合并到第三个新数据库中。 You just need to create the table with no records, then use Azure SQL Data Sync with one-way sync from those 2 databases (member databases) to the newly created table on the new database (hub database).您只需要创建没有记录的表,然后使用 Azure SQL 数据同步从这 2 个数据库(成员数据库)到新数据库(中心数据库)上新创建的表的单向同步。 On the first sync data will be merged on the new table located on the hub database.第一次同步数据将合并到位于中心数据库上的新表上。 Every time a record gets updated, deleted or new record arrive on the member databases then that data change is replicated to the hub database and to the merged table.每次记录更新、删除或新记录到达成员数据库时,数据更改都会复制到中心数据库和合并表。

To know more about the free Azure SQL Data Sync please read here .要了解有关免费 Azure SQL 数据同步的更多信息,请阅读此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM