DDL Mapping in Oracle GoldenGate 12.2
Recently, I was tasked by a customer to set up DDL replication in GoldenGate 12.2 only for CREATE TABLE, ALTER TABLE, CREATE INDEX and ALTER INDEX operations. Having used GoldenGate 12.2 for a while I knew that I could do this but I didn’t remember the exact syntax. Because I was wanting to do a number of statements I needed to make sure that the DDL clause was correct.
My first few tries were not good. I needed to figure out how to essentially do the following logic:
For mapped statements allow
create AND table
create AND index
alter AND table
alter AND index
The eventual syntax that worked is this:
DDL INCLUDE MAPPED OPTYPE create OBJTYPE ‘table’ &
INCLUDE MAPPED OPTYPE create OBJTYPE ‘index’ &
INCLUDE MAPPED OPTYPE alter OBJTYPE ‘table’ &
INCLUDE MAPPED OPTYPE alter OBJTYPE ‘index’
This took a few tries and I verified that a drop table does not replicate. Only that statements that I want to allow will replicate.