转 OGG Troubleshooting-Database error 1 (ORA-00001: unique constraint ...)

Q5:

After imp data to target, when we start replc process, we find the following error:

 

2011-11-10 09:02:52  GGS WARNING     218  Oracle GoldenGate Delivery for Oracle, replc.prm:  Aborted grouped transaction on 'IPS2.TI

PS_TRD_UNATTACH', Database error 1 (ORA-00001: unique constraint (IPS2.PK_TIPS_TRD_UNATTACH) violated).

2011-11-10 09:02:52  GGS WARNING     218  Oracle GoldenGate Delivery for Oracle, replc.prm:  Repositioning to rba 38076530 in seqno

4468.

2011-11-10 09:02:52  GGS WARNING     218  Oracle GoldenGate Delivery for Oracle, replc.prm:  SQL error 1 mapping IPS2.TIPS_TRD_UNATT

ACH to IPS2.TIPS_TRD_UNATTACH OCI Error ORA-00001: unique constraint (IPS2.PK_TIPS_TRD_UNATTACH) violated (status = 1), SQL <INSERT

INTO "IPS2"."TIPS_TRD_UNATTACH" ("PAYORDERID","PAYTIME","MERCHANTSID","PARTNERID","GOODSNAME","GOODSDESC","MP","RESERVED1","RESERVED

2","PAYCHANNELTYPE","PAYCHANNELID","NOTIFYID","SERVICETYPE",">.

2011-11-10 09:02:52  GGS WARNING     218  Oracle GoldenGate Delivery for Oracle, replc.prm:  Repositioning to rba 38076530 in seqno

4468.

2011-11-10 09:02:52  GGS ERROR       218  Oracle GoldenGate Delivery for Oracle, replc.prm:  Error mapping from IPS2.TIPS_TRD_UNATTA

CH to IPS2.TIPS_TRD_UNATTACH.

2011-11-10 09:02:52  GGS ERROR       190  Oracle GoldenGate Delivery for Oracle, replc.prm:  PROCESS ABENDING.

2011-11-10 09:09:59  GGS ERROR       190  Oracle GoldenGate Command Interpreter for Oracle:  Received signal: Program termination (1

5).

2011-11-10 09:09:59  GGS ERROR       190  Oracle GoldenGate Command Interpreter for Oracle:  PROCESS ABENDING.

 

 

A5:

Add handlecollisions or enable handlecollisions to replc parameter. When the errors are disappeared, then disable handlecollisions.

The concept of handlecollisions:

Replicat

Use the HANDLECOLLISIONS and NOHANDLECOLLISIONS parameters to control whether or not

Replicat tries to resolve duplicate-record and missing-record errors when applying SQL on

the target. These errors can occur during an initial load, when data from source tables is

being loaded to target tables while GoldenGate is replicating transactional changes that

are being made to those tables. When GoldenGate applies the replicated changes after the

load is finished, HANDLECOLLISIONS causes Replicat to overwrite duplicate records in the

target tables and provides alternate handling of errors for missing records.

You can use HANDLECOLLISIONS and NOHANDLECOLLISIONS in the following ways:

● You can use either HANDLECOLLISIONS or NOHANDLECOLLISIONS at the root level of the

parameter file to affect all MAP statements.

● You can use HANDLECOLLISIONS and NOHANDLECOLLISIONS as on-off switches for groups of

tables to enable or disable error handling as needed. One remains in effect for all

subsequent MAP statements until the other is encountered.

● You can use HANDLECOLLISIONS and NOHANDLECOLLISIONS within a MAP statement to enable

and disable the functionality for a specific table. See page 204.

Any of the preceding methods can be combined. The use within a MAP statement overrides

other settings. The use as a toggle overrides a global setting. For example, you could have

a global NOHANDLECOLLISIONS setting, and then use HANDLECOLLISIONS within MAP statements

to enable it only for certain tables.

 

 

 http://blog.sina.com.cn/s/blog_4d22b9720100zvof.html

posted @ 2017-09-13 17:25  feiyun8616  阅读(624)  评论(0编辑  收藏  举报