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

Goldengate re-or add synchronized partial tables

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

Share

Shulou(Shulou.com)06/01 Report--

1. Check the primary key, check that the table to be synchronized has a primary key, and if not, add the primary key

two。 Add additional logs for the table:

Dblogin userid goldengate, password goldengate

Add trandata chunqiu.app_sta_flow_list

If you are extracting from the slave database, you can connect to the main database and add:

Dblogin userid @ chunqiu_primary, password goldengate

Add tables that need to be extracted:

Map chunqiu.app_sta_flow_list

3. Stop the application process

3. Use expdp to specify the tables required for scn export:

Reference: https://blog.51cto.com/1937519/2177360

Https://blog.51cto.com/1937519/2177352

Or get started:

Select sysdate,dbms_flashback.get_system_change_number | |''from dual

Expdp system directory=orabackup dumpfile=chunqiu_%U.dmp parallel=3 logfile=chunqiu.log tables=chunqiu.app_sta_flow_list, chunqiu.t_sta_flow_detail, chuqniu.T_BI_CUSTOMER, CLUSTER=no flashback_scn=8089801183405 exclude=trigger

4.impdp imports data to the target database

5. Edit the application process and add the following mapping

If you are using 11g ogg, you need to use double quotes "transaction", "csn", and if you are using 12c ogg, use single quotes:

How to write after goldengate12c:

Map chunqiu.app_sta_flow_list, target chunqiu.app_sta_flow_list, filter (@ GETENV ('transaction',' csn') > 8089801183405)

Goldengate 11g and previous writing:

Map chunqiu.app_sta_flow_list, target chunqiu.app_sta_flow_list, filter (@ GETENV ("transaction", "csn") > 8089801183405)

Error reference:

If you write it in the format before goldengate11G in goldengate 12C:

Map chunqiu.app_sta_flow_list, target chunqiu.app_sta_flow_list, filter (@ GETENV ("transaction", "csn") > 8089801183405)

The process will report an error with the following error message:

2018-09-27 17:59:20 INFO OGG-01298 Column function diagnostic message: could not find column "transaction".

2018-09-27 17:59:20 ERROR OGG-00375 Error in FILTER clause.

6. Start the application process, and after the application process is leveled, turn it off and use it, and remove the filter parameters:

Map chunqiu.app_sta_flow_list, target chunqiu.app_sta_flow_list

Start the application process.

Finally, I just want to make one point:

Goldengate mistakes, do not doubt life, do not doubt goldengate, live a good life, mistakes read the diary.

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