OGG对于没有主键表的处理

问:想用ogg对生产库做个报表库。现在生产库中还有一堆表没有主键(其中有些表的记录甚至完全一样),对这些表上的操作容易导致报表库REPLICAT abended,请问这在OGG配置中是如何避免的?HANDLECOLLISIONS?

答:
In order to maintain data integrity when replicating transactional data, Oracle GoldenGate will use primary key columns or unique index columns to uniquely identify a row when issuing update or delete statements against the target database. If no primary keys or unique indexes exist on the table being replicated, Oracle GoldenGate will use all columns to uniquely identify a row.

It is perfectly acceptable to use all columns to uniquely identify a row under the following conditions:

  • A logical key column cannot be defined for the table using the KEYCOLS parameter.
  • No duplicate rows exist in the table
  • Table contains a small number of rows, so full table lookups on the target database are minimal
  • Table DML activity is very low, so “all column” table supplemental log groups do not negatively impact the source database redo logs

If the table being replicated does not meet all of the conditions listed above, it is recommended to add a column to the table with a SYS_GUID default value to uniquely identify the row.

你可能感兴趣的:(oracle)