资讯专栏INFORMATION COLUMN

GoldenGate REP进程abend问题处理

IT那活儿 / 2935人阅读
GoldenGate REP进程abend问题处理

点击上方“IT那活儿”公众号,关注后了解更多内容,不管IT什么活儿,干就完了!!!


  

某客户现场有一套数据同步环境,通过Oracle GoldenGate工具进行同步,但同步过程中Rep进程经常Abend,严重影响数据同步的一致性,下面就一起带大家了解解决该问题的全过程。

 


问题分析过程


1. 查看备库rep进程日志:

</>复制代码

  1. ggsci>view report rep
    Wildcard MAP resolved (entry MKT01.*):
    MAP MKT01.TABLE1, target MKT01.TABLE1;

    2022-03-22 09:42:02  WARNING OGG-00869  No unique key is defined for table TABLE1. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
    Using following columns in default map by name:
    col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11, col12, col13, col14, col15, col16,
    col17, col18, col19, col20, col21, col22, col23, col24, col25, col26, col27, col28, col29, col30,
    col31, col32, col33, col34, col35, col36, col37, col38, col39, col40, col41, col42, col43, col44,
    col45, col46
    Using the following key columns for target table MKT01.TABLE1: col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11, col12, col13, col14, col15, col16, col17, col18, col19, col20, col21, col22, col23, col24, col25, col26, col27, col28, col29, col30, col31, col32, col33, col34, col35, col36, col37, col38, col39, col40, col41, col42, col43, col44, col45, col46.
    2022-03-22 09:42:02  WARNING OGG-01431  Aborted grouped transaction on MKT01.TABLE1, Mapping error.
    2022-03-22 09:42:02  WARNING OGG-01003  Repositioning to rba 1203 in seqno 56963.
    2022-03-22 09:42:02  WARNING OGG-01151  Error mapping from MKT01.TABLE1 to MKT01.TABLE1.
    2022-03-22 09:42:02  WARNING OGG-01003  Repositioning to rba 1203 in seqno 56963.
    Source Context :
    SourceModule: [er.main]
    SourceID : [/scratch/pradshar/view_storage/pradshar_bug_12547936/oggcore/OpenSys/src
    /app/er/rep.c]
    SourceFunction : [take_rep_err_action]
    SourceLine : [15849]

    2022-03-22 09:42:02  ERROR OGG-01296  Error mapping from MKT01.TABLE1 t
    o MKT01.TABLE1.
除此之外,没有明显报错。
2. 查看备库dsc文件:

</>复制代码

  1. vi /ogg/ggs/dirrpt/repdsc.dsc
    Oracle GoldenGate Delivery for Oracle process started, group REP discard file opened: 2022-03-22 09:42:02
Key column UPDATETIME (45) is missing from update on table MKT01.TABLE1
Missing 1 key columns in update for table MKT01.TABLE1.
注意:报错UPDATETIME 找不到,其实在备库和主库,都是有此列的。注意报错中的45,45是在dba_log_group_columns中 MKT01.TABLE1表该列的位置(position)。

</>复制代码

  1. Current time: 2022-03-22 09:42:02
    Discarded record from action ABEND on error 0
    Aborting transaction on /ogg/ggs/dirdat/zy beginning at seqno 56963 rba 1203
    error at seqno 56963 rba 1203
    Problem replicating MKT01.TABLE1 to MKT01.TABLE1
    Mapping problem with compressed update record (target format)...
    *
    col1 = 32887
    col2 = 0
    col3 = 7875DFD3A5E5CE1DB1E37ADA550209CB
    col4 = 01
    col5 = A38BD55A8B8054C1AE6F4071C750FAAD4F5DBBBD34CB150CCA7810D15CBB8795
    col6 = 74
    col7 = NULL
    col8 = NULL
    col9 = NULL
    col10 = 6FA95A63159E2034AA855EF545A9C5D4
    col11 = NULL
    col12 = NULL
    col13 = NULL
    col14 = NULL
    col15 = 1
    col16 = 1
    col17 = NULL
    col18 = 370103
    col19 = NULL
    col20 = NULL
    col21 = NULL
    col22 = NULL
    col23 = NULL
    col24 = NULL
    col25 = NULL
    col26 = NULL
    col27 = NULL
    col28 = NULL
    col29 = NULL
    col30 = NULL
    col31 = 0
    col32 = 2022-01-07 09:06:59
    col33 = 0
    col34 = NULL
    col35 = <Raw Data>
    000000: e5 b1 b1 e4 b8 9c e7 9c 81 e5 b9 bf e5 ae 89 e7 |................|
    000010: 89 a9 e4 b8 9a e6 9c 89 e9 99 90 e5 85 ac e5 8f |................|
    000020: b8 |. |
    col36 = 2022-01-07 09:06:59
    col37 = <Raw Data>
    000000: e5 b1 b1 e4 b8 9c e7 9c 81 e5 b9 bf e5 ae 89 e7 |................|
    000010: 89 a9 e4 b8 9a e6 9c 89 e9 99 90 e5 85 ac e5 8f |................|
    000020: b8 |. |
    col38 = NULL
    col39 = 1
    col40 = 488
    col41 = 4881113301
    col42 = 1
    col43 = NULL
    col44 = 2
    col45 = 1939-10-25 00:00:00
    *
    Process Abending : 2022-03-22 09:42:02
3. 根据Mos相关资料得知以下信息 :

Would it be feasible to exclude the table and sync it up later.


It looks like trandata was not added again when the col46 column was added on source. The values of updatetime would be null on target as no value would be replicated if keycols are used.

--Output from source.

select count(1) from dba_log_group_columns where table_name=TABLE1;

If it returns as 45, please delete the trandata and re-add it again.

It should return as 46.

 

4. 检查相关环境信息:
  • 实际上 select *  from dba_log_group_columns where table_name=TABLE1;这个就反馈0;


  • SELECT * FROM  dba_log_groups where table_name not in (select distinct  table_name from   DBA_LOG_GROUP_COLUMNS  where  owner=MKT01  )。

    and owner=MKT01

此查询返回如下的结果:

</>复制代码

  1. TABLE1_LS
    WY_XQXXB_LS

    WY_XQXXB
    TABLE1
    TABLE11
就是说,如上的5个表在 dba_log_groups中有,但是在 dba_log_group_columns中没有。
对此现象,参考资料:
OGG Supplemental Redo Log Data Is Enabled But Select From Dba_log_group_columns dont show the table. (Doc ID 1359172.1)
在此文章中,给出如下解释:

If the table contains only primary key columns then the table will be listed in dba_log_group_columns view else it will be listed in  dba_log_groups. 


5. 先在rep进程中排除此表,当lag为0时,再初始化同步此表,问题解决。




本文作者:张连坤

本文来源:IT那活儿(上海新炬王翦团队)

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/129478.html

相关文章

发表评论

0条评论

IT那活儿

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<