Source table DDL has new columns added or dropped but target table always remains the same. How I can avoid doing constant DEFGEN? (Doc ID 2077469.1)

Last updated on JANUARY 09, 2017

Applies to:

Oracle GoldenGate - Version 11.2.1.0.10 and later
Information in this document applies to any platform.

Goal

The source table DDL may have columns added or dropped but there is always a set of columns that always remained. The table table always stays the same and never assigns the added or dropped columns at source. As replicat needs to mapped out the source table, every time there is a DDL change, DEFGEN needs to be done and the definition file copied across to the target. This is time consuming and takes a lot of manual effort.

For example the target table is always
CREATE TABLE tcustmer
(
cust_code VARCHAR2(4),
name VARCHAR2(30)
);

and the Source is
CREATE TABLE tcustmer
(
cust_code VARCHAR2(4),
name VARCHAR2(30),
city VARCHAR2(20),
state CHAR(2),
extracolumns1 CHAR(2),
extracolumns2 CHAR(2),
PRIMARY KEY (cust_code)
USING INDEX
);

And you may do
ALTER TABLE tcustmer ADD morecolumns varchar(6)
or ALTER TABLE drop column city
But columns cust_code and name is always present.


 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms