跨 3 个实例的 Oracle 复制/同步
我有 3 个具有相同数据和方案的 Oracle 数据库实例,我希望它们保持同步,这些实例在地理上相距很远,并且可以在本地和通过 WAN 进行读写。 Oracle 中有内置的东西可以做到这一点吗?同步不需要实时完成,它可以是一个日终流程,确保它们同步并生成差异报告等...有人处理过这样的问题吗?
I have 3 Oracle database instances with the same data and scheme that I want to keep in sync, the instances are geographically separated by large distances and will have reads and writes both locally and from over the WAN. Is there anything built in to Oracle for doing this? The synchronization doesn't need to be done in real-time, it can be an end of day process that makes sure they are synced up and generates a report of discrepancies etc... Has anyone dealt with an issue like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就 Oracle 本机功能而言,您将使用 Streams(假设您使用的是 10/11g)。
参见文档
配置起来有点耗时,但功能齐全。
[编辑以回应您的评论]
我已经看到复制可以与最多三个数据库一起使用,并且在出现 PK 冲突时将冲突解决设置为第一个时间戳“获胜”。如果大多数新的/修改的记录源自您的一个站点,并且只需要迁移到其他两个站点,那么您应该不会有问题。如果每个站点都有重要的 DML,那么拥有一个 PK 会有所帮助,该 PK 是由 Oracle 序列维护的代理键,设置为递增 3,并在第一个站点从 1 开始,在第二个站点从 2 开始,等等,以便每个站点都为插入生成不冲突的密钥。我想,如果每个站点的交易率都很高,那么您将在某个时刻达到某些 Streams 基础设施限制。
As far as Oracle native functionality, you'll be using Streams (assuming you are on 10/11g).
see doc
Somewhat time-consuming to configure, but full-featured.
[Edit in response to one of your comments]
I've seen replication work with up to three db's with conflict resolution set to first timestamp "wins" in case of PK conflicts. If most of the new/modified records originate at one of your sites and just need to be migrated to the other two you shouldn't have a problem. If you have significant DML at each site, then it helps to have a PK that is a surrogate key maintained by an Oracle sequence set to increment by 3 and starting with 1 at the first site, 2 at the second, etc., so that each site generates non-conflicting keys for inserts. I would imagine that if you have high transaction rates at each site you're going to hit some Streams infrastructure limits at some point.
我个人没有使用过这个功能,但我相信 Oracle 的数据复制功能可以很好地满足这一需求。
Oracle 数据复制和集成
I haven't used this personally, but I believe Oracle's Data Replication feature will serve this need nicely.
Oracle Data Replication and Integration