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 understand GoldenGate additional logs

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article shows you how to understand GoldenGate attached logs, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

What is the additional log? Why do I need to open additional logs when using OGG?

1. The reason why OGG needs to open additional logs

The replication of primary and secondary libraries realized by GoldenGate is not based on SQL replication, but based on logical change replication (LCR).

To achieve this logical replication ORACLE, you need to open an additional log to record the additional information you need.

Second, additional logs

Supplemental log instructs the database to add additional information to the log stream to support log-based tools such as logical standby, GoldenGate, LogMiner, and so on. Can be set on databases and tables.

There are two types of additional logs: minimum additional log (minimal supplemental logging) and identification key log (identification key logging).

GoldenGate explicitly requires that the minimum additional log be opened at deployment time. The minimum additional log ensures that LogMiner (or any other LogMiner-based product) can support row links, clustered tables, index organization tables, and so on.

III. Table-level additional logs

In addition, table-level additional logs are required during the replication process. To add a trandata

The process of adding a table-level additional log is as follows: if there is a primary key, only the primary key is added; if there is no primary key, a unique index is added; and if neither is added, all columns are added.

Adding the primary key or unique index to the additional log is due to the need of the master / slave database for the following reasons:

The data of the main database has changed, and GoldenGate is not based on SQL replication. If you want to change the data of the standby database, it is necessary to establish a mapping relationship between the main database and the standby database. The primary key or unique key of each table is a good choice. Why. Because as long as the tables of the primary and standby libraries are mapped first, and then mapped through the primary key or unique key, the primary key or unique key is unique, so a row of data is modified on the primary library. Naturally, there is a row of data corresponding to it on the standby database.

For example, when we execute this statement, the trail file has at least the following information

Update dept set dname='Personnel' where dname='RESEARCH'

Mirror image

Deptno

DNAME

Table

Rear mirror image

20Personnel

Emp.dept

Some of the above mirrored information will be written into the trail file, and the slave database will modify the standby database data through this information.

Ps: there are also some other databases implemented by recording rowid, but this approach has obvious drawbacks.

4. When opening additional logs, you need to pay attention to:

1. For tables without primary and unique keys, although all columns can be used as benchmarks, such tables generate a lot of log volume and rollback segment overhead.

two。 When adding additional logs. Sometimes Lock causes the attached log of the table not to be opened

3. In the process of adding, if a table error is not successfully added, it will not be executed later, and no additional logs will be added to all the subsequent tables.

Only some of them are listed here, and others need to be found or summarized in production.

The above content is how to understand the GoldenGate attached log. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

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