ITPub博客

首页 > 数据库 > Oracle > oracle goldengate 实现目标记录不存在的情况复制进程正常运行

oracle goldengate 实现目标记录不存在的情况复制进程正常运行

原创 Oracle 作者:paulyibinyi 时间:2014-11-04 23:53:25 0 删除 编辑

REPERROR

包含如下action,

ABEND: roll back the transaction and stop processing.

DISCARD: log the error to the discard file and continue processing.

EXCEPTION: send the error for exceptions processing (see “Handling errors as exceptions”.

IGNORE: ignore the error and continue processing.

RETRYOP [MAXRETRIES ]: retry the operation, optionally up to a specific number of times.

TRANSABORT [, MAXRETRIES ] [, DELAY[C]SECS ]: abort the transaction and reposition to the beginning, optionally up to a specific number of times at specific intervals.

RESET: remove all previous REPERROR rules and restore the default of ABEND.

TRANSDISCARD: discard the entire replicated source transaction if any operation within that transaction, including the commit, causes a Replicat error that is listed in the

             error specification. This option is useful when integrity constraint checking is disabled on the target.

TRANSEXCEPTION: perform. exceptions mapping for every record in the replicated source transaction, according to its exceptions-mapping statement, if any operation within

             that transaction (including the commit) causes a Replicat error that is listed in the error specification.

oracle ogg 正常情况下 如果目标记录不存在的情况复制进程会abended的
以下设置会忽略这种错误,并且写到discard文件,复制正常进行
GGSCI (yibin) 161> view param rora01
REPLICAT RORA01
SETENV ( NLS_LANG =AMERICAN_AMERICA.AL32UTF8)
USERID target@gbk, PASSWORD target
REPERROR (1403, DISCARD)
--HANDLECOLLISIONS
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/RORA01.DSC, PURGE
MAP source.test, TARGET target.test;

discard中记录,一个是update操作,一个是delete操作


Oracle GoldenGate Delivery for Oracle process started, group RORA01 discard file opened: 2014-11-04 23:09:04

Current time: 2014-11-04 23:10:37


Operation failed at seqno 9 rba 1625
Discarding record on action DISCARD on error 1403
Problem replicating SOURCE.TEST to TARGET.TEST
Record not found
Error (1403) occurred with compressed update record (target format)...
*
ID = 
NAME = zhang
*
Current time: 2014-11-04 23:19:49


Operation failed at seqno 9 rba 1758
Discarding record on action DISCARD on error 1403
Problem replicating SOURCE.TEST to TARGET.TEST
Record not found
Error (1403) occurred with delete record (target format)...
*
ID = 12
*

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7199859/viewspace-1320730/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
学习数据库

注册时间:2007-12-11

  • 博文量
    907
  • 访问量
    6894208