Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to prevent data synchronization in an endless loop with ogg

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "ogg how to prevent data endless loop synchronization", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "ogg how to prevent data endless loop synchronization" bar!

Recently, during the data migration from ORACLE to MYSQL using OGG, we encountered the problem of two-way synchronous data endless loop. In the normal synchronization of oracle, we use the following parameters to prevent the extraction process from extracting transactions committed by the replication process:

TRANLOGOPTIONS EXCLUDEUSER OGGGETAPPLOPS IGNOREREPLICATES

In fact, the function of tranlogoptions excludeuser OGG is to exclude OGG users when extracting logs, GETAPPLOPS refers to the transactions that grab the application, and IGNOREREPLICATES is the transactions that ignore the replication process.

GETAPPLOPS | IGNOREAPPLOPS: Controls whether or not data operations (DML) produced by business applications except Replicat are included in the content that Extract writes to a specific trail or file. GETREPLICATES | IGNOREREPLICATES: Controls whether or not DML operations produced by Replicat are included in the content that Extract writes to a specific trail or file.

However, when the extraction is carried out on the MYSQL side, it is found that the extraction process does not support the tranlogoptions excludeuser parameter, even if the IGNOREREPLICATES is added, it will not take effect because the replication process cannot be identified.

When mysql synchronizes to oracle, it still extracts some of the data and goes to oracle, and in my ORACLE to MYSQL synchronization, my actual relationship is

After Omurmuri-> Omurmuri-> M, M is synchronized to two Os respectively.

In the "Administering Oracle GoldenGate for Windows and UNIX" manual, 9.3 Preventing Data Looping describes how to identify the parameters of the replication process on the database side, which can prevent the extraction process from extracting transactions from the replication process:

DB2 z/OS, DB2 LUW, DB2 for i, and Informix

TRANLOGOPTIONS EXCLUDEUSER user

Special use of EXCLUDEUSERID Database_uid is required in Informix

MySQL and NonStop SQL/MX

TRANLOGOPTIONS FILTERTABLE table_name

This table_name refers to checkpointtable.

Oracle

Set labels in the replication process, such as

DBOPTIONS SETTAG 0935

Then exclude tags in the extraction process

TRANLOGOPTIONS EXCLUDETAG 0935

If there are multiple tags, the extraction process must be added to each

Of course, it can also be used to exclude users

TRANLOGOPTIONS EXCLUDEUSER user

SQL Server

TRANLOGOPTIONS EXCLUDETRANS transaction_name

This transaction name is not understood. If it is not set, the default transaction name should be ggs_repl. The original explanation:

This parameter statement is only required if the Replicat transaction name is set to something other than the default of ggs_repl.

Sybase

TRANLOGOPTIONS EXCLUDETRANS transaction name

Or

TRANLOGOPTIONS EXCLUDEUSER user name

Thank you for your reading, the above is the content of "ogg how to prevent data endless loop synchronization". After the study of this article, I believe you have a deeper understanding of how ogg prevents data endless loop synchronization, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report