用户反馈有个表没有同步成功。
这个表刚10天前做了一次同步并对此表导过一次数据。收到这个问题很是郁闷 。
检查源端 EXT进程 以及PUMP进程
stats deprst03,table inv.ORG_ACCT_PERIODS
Sending STATS request to EXTRACT DEPRST03 ...
Start of Statistics at 2019-12-09 16:37:23.
Output to /oradata/goldengate/11.2.1/dirdat/r3:
Extracting from INV.ORG_ACCT_PERIODS to INV.ORG_ACCT_PERIODS:
*** Total statistics since 2019-12-09 16:26:02 ***
Total inserts 0.00
Total updates 2.00
Total deletes 0.00
Total discards 0.00
Total operations 2.00
*** Daily statistics since 2019-12-09 16:26:02 ***
Total inserts 0.00
Total updates 2.00
Total deletes 0.00
Total discards 0.00
Total operations 2.00
*** Hourly statistics since 2019-12-09 16:26:02 ***
Total inserts 0.00
Total updates 2.00
Total deletes 0.00
Total discards 0.00
Total operations 2.00
*** Latest statistics since 2019-12-09 16:26:02 ***
Total inserts 0.00
Total updates 2.00
Total deletes 0.00
Total discards 0.00
Total operations 2.00
目标端状态
GGSCI (rstreportDB) 2> stats reperp03,table INV.ORG_ACCT_PERIODS
Sending STATS request to REPLICAT REPERP03 ...
Start of Statistics at 2019-12-09 15:44:03.
Replicating from INV.ORG_ACCT_PERIODS to HSS_EBS.ORG_ACCT_PERIODS:
*** Total statistics since 2019-12-03 15:09:16 ***
No database operations have been performed.
*** Daily statistics since 2019-12-09 00:00:00 ***
No database operations have been performed.
*** Hourly statistics since 2019-12-09 15:00:00 ***
No database operations have been performed.
*** Latest statistics since 2019-12-03 15:09:16 ***
No database operations have been performed.
End of Statistics.
显示这样应该是有更新。但是没有记录到
如果没有数据来应该是这样的:所以得出是有数据过来的。
GGSCI (ERPUAT3) 7> stats reperp03,table ***
Sending STATS request to REPLICAT REPTEST2 ...
Start of Statistics at 2019-12-09 16:52:23.
End of Statistics.
再检查discard 文件,发现在异常
[oracle@rstreportDB dirrpt]$ more reperp03.dsc
Oracle GoldenGate Delivery for Oracle process started, group REPERP03 discard file opened: 2019-12-09 16:26:48
Current time: 2019-12-09 16:26:48
Operation failed at seqno 14686 rba 175020
Discarding record on action DISCARD on error 0
Problem replicating INV.ORG_ACCT_PERIODS to HSS_EBS.ORG_ACCT_PERIODS
Mapping problem with compressed update record (target format)...
*
ORGANIZATION_ID = 426
LAST_UPDATE_DATE = 2019-12-09 00:00:00
LAST_UPDATED_BY = 6007
LAST_UPDATE_LOGIN = 6007
SCHEDULE_CLOSE_DATE = 2019-11-30 00:00:00
PERIOD_CLOSE_DATE = 2019-12-09 00:00:00
OPEN_FLAG = P
*
Current time: 2019-12-09 16:26:48
Operation failed at seqno 14686 rba 207393
Discarding record on action DISCARD on error 0
Problem replicating INV.ORG_ACCT_PERIODS to HSS_EBS.ORG_ACCT_PERIODS
Mapping problem with compressed update record (target format)...
*
ORGANIZATION_ID = 426
SCHEDULE_CLOSE_DATE = 2019-11-30 00:00:00
OPEN_FLAG = N
SUMMARIZED_FLAG = Y
*
Current time: 2019-12-09 16:38:30
到官网查找都是没有相关记录。
MGR进程也重启了。都是不行。
最后检查表两端的索引。发现源端比目标端多一条索引。
发现目标端是没有CUX这个索引的。因为在当初在导入数据的时候。导入脚本只对INV用户转换为目标端用户。而CUX用户没有转换。所以导致这一条索引没有弄到目标端去。
加入索引后。重启目标端。同步就正常了。