The extract on OGG environments setup for DDL replication can abend with following errors
eg., 查看对应的report发现如下日志:
2014-05-20 12:47:32 WARNING OGG-01417 CACHEMGR: duplicate transaction secondary key: 000C000D000003F8 primary key: 0028000D.
2014-05-20 12:47:32 WARNING OGG-01262 The call to the cm_obj_new() function from line 2258 in CM_object_create
(op_t *, short, const uint8_t *, short, short, const uint8_t *, void *, void *(*)(void *), op_t *, int, co_t **)() failed with reason 'cm_obj_new: 0028000D: error: 115'.
Source Context :
SourceModule : [er.processloop]
SourceID : [/scratch/aime1/adestore/views/aime1_staxj04/oggcore/OpenSys/src/app/er/processloop.cpp]
SourceFunction : [process_extract_loop()]
SourceLine : [875]
2014-05-20 12:47:32 ERROR OGG-01028 failed to start transaction 12.13.1016 (0x000c.00d.000003f8).;
分析原因如下:
When using PURGEDDLHISTORY and PURGEMARKERHISTORY in manager parameter file, manager deletes the marker table entries periodically.
OGG extract skips the non-insert records on marker table correctly however the associated transaction was left behind and
not cleaned up from memory causing the extract to run in to duplicate transaction error.
Issue affects OGG versions 11.2.1.0.7+ including OGG v12
The fix is in bug's 18874054 and 19721652
Both the bug fixes are needed to avoid hitting the error and OGG version 11.2.1.0.28 has those bug fixes.
goldengate在MGR进程中提供了系统自动清理DDL源数据(ggs_marker/ggs_ddl_hist)的功能,但是有的OGG版本的这两个功能会引起一些BUG。并且按照ORACLE官方的说法也是建议手工对这些表备份后再进行清理,所以此处对手工清理方式进行说明。
delete from ggs_marker where sysdate - to_date(OPTIME, 'yyyy-mm-dd hh24:mi:ss') > 10;
delete from GGS_DDL_HIST where sysdate - to_date(OPTIME, 'yyyy-mm-dd hh24:mi:ss') > 10;
commit;