goldengate 的initial load 當目的表無pk或者ui時會產生重複記錄

msdnchina發表於2011-09-28
OGG can insert duplicate rows when there is no unique index primary key UI PK defined [ID 1350948.1]

Applies to:

Oracle GoldenGate - Version: 9.5_EA and later [Release: 9.5.0 and later ]
Information in this document applies to any platform.

Symptoms

Target table with no UI or PK has duplicate rows after initial load.
Replicat is (may be) using HANDLECOLLISIONS and KEYCOLS

Changes

An initial load.

Cause

It is possible to get duplicate rows because there is no key / index constraint to prevent it. Keycols will not help.

Solution

Replicat relies on the database to return a constraint error when a duplicate row is inserted. In cases where there is no UI or PK, no error is returned. HC will not help because there is no error. KEYCOLS is used as a retrieval mechanism, not an index on a write.
The fact that replicat treats the whole row as a key when there is no defined key is no help.
Replicat has no way of knowing it should not insert a duplicate row if there is no constraint.
User must define a key or UI.[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/161195/viewspace-1055385/,如需轉載,請註明出處,否則將追究法律責任。

相關文章