oracle goldengate 實現目標記錄不存在的情況複製程式正常執行

paulyibinyi發表於2014-11-04

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 , 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部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-1320730/,如需轉載,請註明出處,否則將追究法律責任。

相關文章