Hi,
You can get ” OGG-01169 encountered an update where all key columns for target table ” error.
Details of error are as follows.
: [/ggateb01/goldengate/product/GG19cFor18cDB/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ggateb01/goldengate/product/GG19cFor18cDB/replicat(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/ggateb01/goldengate/product/GG19cFor18cDB/replicat()]
2020-05-17 04:09:09 ERROR OGG-01169 Encountered an update where all key columns for target table MSDBA.TEST_TABLE are not present.
To solve this error, Use KEYCOLS parameter to define the primary key.
And Add APPLYNOOPUPDATES to replicat parameter file to force the update to be applied using all columns in both the SET and WHERE clause.
When I add APPLYNOOPUPDATES to replicat parameter file, replicat process works fine.
Second case and solution of this error are as follows.
1) Create Unique Index at Target with new name.
CREATE UNIQUE INDEX "<USER>"."<TABLE>2" ON "<USER>"."<TABLE>" ("EMPLID", "EMPL_RCD", "EFFDT", "EFFSEQ")
2) Make the unique index “INVISIBLE” so it doesn’t impact application queries.
ALTER INDEX <index name> INVISIBLE;
3) Use OGG parameter ALLOWINVISIBLEINDEXKEYS
Use the ALLOWINVISIBLEINDEXKEYS parameter in the GLOBALS file to allow Extract and Replicat to use columns that are part of an Oracle invisible index as a unique row identifier. By default, the process abends when this type of index is the only available unique identifier.
set the following parameter to TRUE in the params.sql
script: define allow_invisible_index_keys = 'TRUE'
This functionality is automatically enabled for integrated capture and replicat.
Do you want to learn Oracle Goldengate from scratch, then read the following Goldengate Tutorial articles.
https://ittutorial.org/goldengate-tutorials-oracle-for-beginners/