GoldenGate 复制进程报错"OGG-01296 Error mapping",丢弃文件报错“Mapping problem with delete record (target format)”,且实际条目存在

2022-11-03,,,,

故障描述:

(1).复制进程 Abended,通过view report语句查看可发现类似如下的报错
2017-10-23 15:01:43 ERROR OGG-01296 Error mapping from CMS_ADM.T3010 to CMS_ADM.T3010.
(2).查看丢弃文件(Discard File)的内容类似如下:
Oracle GoldenGate Delivery for Oracle process started, group RAOC discard file opened: 2017-10-23 15:28:08.467831
Key column PK_ID (0) is missing from delete on table CMS_ADM.T3010
Missing 1 key columns in delete for table CMS_ADM.T3010.
Current time: 2017-10-23 15:28:18
Discarded record from action ABEND on error 0
Aborting transaction on ./dirdat/ao beginning at seqno 17674 rba 29602113
error at seqno 17674 rba 29602113
Problem replicating CMS_ADM.T3010 to CMS_ADM.T3010
Mapping problem with delete record (target format)...
*
P_CODE = 01206135
000000: 30 31 32 30 36 31 33 35 01206135
 
AIRCRAFT_TYPE = 737GY
000000: 37 33 37 47 59 737GY
 
TECH_NO = Z030
000000: 5a 30 33 30 Z030
 
START_DATE = 2017-10-19 00:00:00
000000: 32 30 31 37 2d 31 30 2d 31 39 20 30 30 3a 30 30 2017-10-19 00:00
000010: 3a 30 30 :00

(3).源端查看同步表的 TRANDATA,发现记录字段为 P_CODE、AIRCRAFT_TYPE、TECH_NO、START_DATE。同时,表不久前更换主键为 PK_ID。
 
故障原因:
同步表更换主键列后,复制进程采用新主键(PK_ID)作为唯一标示,而源端投递过来的 trail 文件仍使用原来的主键(P_CODE、AIRCRAFT_TYPE、TECH_NO、START_DATE)作为唯一标示。因此当执行删除语句时,由于需要靠唯一标示定位数据,因此复制进程报错。

 
故障处理方式:
1.重新同步
注意:此方式整改彻底,可以避免原主键有朝一日失去唯一性的情况方式。
(1).对更换主键的表重新添加 TRANDATA,确保作为唯一标示的记录字段为更新后的主键。
(2).重新同步该表。
2.临时处理
(1).修改目标端复制进程参数,使原有同步参数变为如下。
MAP CMS_ADM.T3010, TARGET CMS_ADM.T3010, KEYCOLS(P_CODE, AIRCRAFT_TYPE, TECH_NO, START_DATE);
(2).重启复制进程。
 

<!--
html, body {font-size: 12pt;}body {font-family: Helvetica, 'Hiragino Sans GB', '微软雅黑', 'Microsoft YaHei UI', SimSun, SimHei, arial, sans-serif;line-height: 1.6;margin: 0 auto;padding: 20px 16px;padding: 1.25rem 1rem;}h1, h2, h3, h4, h5, h6 {margin:20px 0 10px;margin:1.25rem 0 0.625rem;padding: 0;font-weight: bold;}h1 {font-size:20pt;font-size:1.67rem;}h2 {font-size:18pt;font-size:1.5rem;}h3 {font-size:15pt;font-size:1.25rem;}h4 {font-size:14pt;font-size:1.17rem;}h5 {font-size:12pt;font-size:1rem;}h6 {font-size:12pt;font-size:1rem;color: #777777;margin: 1rem 0;}div, p, ul, ol, dl, li {margin:0;}blockquote, table, pre, code {margin:8px 0;}ul, ol {padding-left:32px;padding-left:2rem;}ol.wiz-list-level1 >--> li {list-style-type:decimal;}ol.wiz-list-level2 > li {list-style-type:lower-latin;}ol.wiz-list-level3 > li {list-style-type:lower-roman;}blockquote {padding:0 12px;padding:0 0.75rem;}blockquote > :first-child {margin-top:0;}blockquote > :last-child {margin-bottom:0;}img {border:0;max-width:100%;height:auto !important;margin:2px 0;}table {border-collapse:collapse;border:1px solid #bbbbbb;}td, th {padding:4px 8px;border-collapse:collapse;border:1px solid #bbbbbb;min-height:28px;word-break:break-all;box-sizing: border-box;}.wiz-hide {display:none !important;}
-->

GoldenGate 复制进程报错"OGG-01296 Error mapping",丢弃文件报错“Mapping problem with delete record (target format)”,且实际条目存在的相关教程结束。

《GoldenGate 复制进程报错"OGG-01296 Error mapping",丢弃文件报错“Mapping problem with delete record (target format)”,且实际条目存在.doc》

下载本文的Word格式文档,以方便收藏与打印。