OGG-01296、OGG-06439、OGG-01169 表有主键或惟一键,但是仍然使用全部列来解析行

0    542    2

Tags:

👉 本文共约724个字,系统预计阅读时间或需3分钟。

现象

OGG的replicate进程报错,查看报告文件:

问题分析

日志中以下问题比较可疑:

表LHR.ORDERS是有主键的,但是,OGG却不认!!

查询表的约束状态validated:

发现有很多都是NOT VALIDATED,包括ORDER_PK。

问题解决

根据MOS No Unique Key Is Defined For Table - OGG-01296 Error mapping (Doc ID 2017835.1)可知,问题在于表的主键或惟一键处于“NOT VALIDATED”状态

Verified that the table had primary and unique key but goldengate was still using all the columns to resolve the row.

执行这些SQL语句,再重新启动replicate进程,问题得到解决!

另外,配置OGG的时候,尽量启用所有列的附加日志,如下:

本人提供Oracle、MySQL、PG等数据库的培训和考证业务,私聊QQ646634621或微信db_bao,谢谢!

扩展

另外,也有可能会导致如下的错误:OGG-01296、OGG-06439、OGG-01169 Encountered an update where all key columns for target table LHR.ORDER_ITEMS are not present.

也需要查询是否含有外键导致!!!

Replicat abends with OGG-01169 error (Doc ID 2048907.1)

SYMPTOMS

CAUSE

The cause of the issue was constraint being enabled but not in validated state.

We need to have the constraint validated and enabled to be used as keycol.

SOLUTION

Validate the constraint in-order to use the PK columns as keycols.

-- Example:

ALTER TABLE dept MODIFY CONSTRAINT dname_key VALIDATE;

Reference:

Document: 1578985.1 - Replicat Abended With Error OGG-01169 Encountered an update where all key columns for target table are not present, INFO OGG-01451 Unique key cannot be used due to the inclusion of virtual columns

标签:

头像

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

17 − 13 =

 

嘿,我是小麦,需要帮助随时找我哦
  • 18509239930
  • 个人微信

  • 麦老师QQ聊天
  • 个人邮箱
  • 点击加入QQ群
  • 个人微店

  • 回到顶部
返回顶部