Applies to:
Oracle GoldenGate - Version: 5.0.0 and later [Release: 5.0.0 and later ]Information in this document applies to any platform.
Goal
To handle / replicate tables with no (without) primary key (PK) or unique index (UI) or UPISolution
By default, all the columns (except LOB, XML, UDT et al) will be used as the key. Supplemental logging of the table is required.For batch updates and deletes, one update/delete statement in source will becomes multiple ones in target. if each has to do a full-table scan, it will slow down the replication. an index (even not unique) may be added to target to speed up the replication.
However, if a subset of columns is known to be unique, even without unique index, it may be used as key with KEYCOLS parameter.
here is an example of the setup:
let's use a simple example to explain the case:
source: create table s1 (a number, b number, c number);
target: create table t1 (a number, b number, c number);
there is no pk/ui.
ggsci> dblogin user id
ggsci> add trandata
extract: table
replicat: map
insert into s1 values (1,2,3);
commit;
the row will be replicated to t1.
update s1 set c=4;
commit;
the column 'c' in T1 will be updated.
delete s1;
commit;
the row in T1 will be deleted.
if (only if) you know column A is unique even there is no pk/ui.
extract: table
This is covered in version 11 installation guide for oracle db, page 42.