Installed Goldengate Version 18.1.0.0.0 for Oracle 11gR2. Table has primary key and yet goldengate complains that there is no key found,see below
GGSCI (server01.localdomain as gguser@UPGR) 3> add trandata scott.books
2019-01-23 22:44:42 WARNING OGG-06439 No unique key is defined for table BOOKS. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
2019-01-23 22:44:42 INFO OGG-15130 No key found for table SCOTT.BOOKS. All viable columns will be logged.
2019-01-23 22:44:42 INFO OGG-15135 TRANDATA for instantiation CSN has been added on table SCOTT.BOOKS`
GGSCI (server01.localdomain as gguser@UPGR) 10> info trandata scott.books
Logging of supplemental redo log data is enabled for table SCOTT.BOOKS.
Columns supplementally logged for table SCOTT.BOOKS: "AUTHOR", "ID", "LANGUAGE_ID", "TITLE", "YEAR_PUBLISHED".
Prepared CSN for table SCOTT.BOOKS: 978016
This is DDL of scott.books from Oracle SQL Developer
CREATE TABLE "SCOTT"."BOOKS"
("ID" NUMBER(*,0),
"TITLE" VARCHAR2(26 BYTE),
"AUTHOR" VARCHAR2(23 BYTE),
"YEAR_PUBLISHED" NUMBER(*,0),
"LANGUAGE_ID" NUMBER(*,0),
CONSTRAINT "PK_ID" PRIMARY KEY ("ID")
)
Can someone point me in right direction.
Thanks
From dba_constraints
SQL> SELECT
2 constraint_name,
3 constraint_type,
4 status,
5 validated
6 FROM
7 dba_constraints
8 WHERE
9 owner = 'SCOTT'
10 AND table_name = 'BOOKS';
CONSTRAINT_NAME C STATUS VALIDATED
------------------------------ - -------- -------------
PK_ID P ENABLED VALIDATED
Best Answer
This happens when the PK exists, but it is not enabled or not validated. Make sure the PK is enabled and validated, then try adding trandata again.