gpt4 book ai didi

mysql - AWS DMS 双向数据复制

转载 作者:行者123 更新时间:2023-11-29 05:51:06 24 4
gpt4 key购买 nike

我为单向数据复制创建了 RDS

(源(Sql_server)到目标(MySql 服务器)”,

这将如何进行双向数据复制

解释:-

第 1 步:我将 AWS DMS(关系数据库服务)创建到 aws 帐户中

第 2 步:将 RDS 登录到 SQl server 2017。

第 3 步:然后我点击了此链接

https://aws.amazon.com/blogs/database/introducing-ongoing-replication-from-amazon-rds-for-sql-server-using-aws-database-migration-service/

第 4 步:在此链接之后,数据复制工作正常的一种方式。(意味着现在当我更新到 sql server 表时,它反射(reflect)到 mysql 数据库表中)

我需要双向复制

任何想法或建议谢谢

阿曼迪普

最佳答案

根据 Amazon 的说法,这不是 DMS 的推荐做法:

Bi-directional replication is not recommended with DMS. A typical replication scenario has a single source and a target. When the source and target endpoints are distinct, DMS guarantees transactional integrity. In bi-directional replication these source and targets can be reversed and lead to unintended consequences if the same row is updated by two different replication tasks. Two-way replication works best when the tables being updated from the source to the target are logically independent from the tables being updated from the target to the source.

(来自 https://aws.amazon.com/dms/faqs/)

当然,您可以尝试设置两个指向不同方向的 DMS 作业。 (你确实说过你在寻找想法;我认为这不是一个特别好的想法。)你也可以考虑设置一个 SQL Server RDS 实例(而不是 MySQL),因为你可以使用一些 SQL Server 的内置双向复制。这里的好处是它可以解决您在不同的数据库系统之间可能遇到的问题(例如循环)。微软对此有如下说法:

Bidirectional transactional replication is a specific transactional replication topology that allows two servers to exchange changes with each other: each server publishes data and then subscribes to a publication with the same data from the other server. The @loopback_detection parameter of sp_addsubscription (Transact-SQL) is set to TRUE to ensure that changes are only sent to the Subscriber and do not result in the change being sent back to the Publisher.

(来自 https://learn.microsoft.com/en-us/sql/relational-databases/replication/transactional/bidirectional-transactional-replication?view=sql-server-2017)

祝你好运!

关于mysql - AWS DMS 双向数据复制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54107346/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com