In this below tutorial, we will enable DDL replication for a table, which is already part of  goldengate replication and currently only DML transactions are getting replicated.

TABLE_NAME = APPLIANCE.CLASSTAB1

To enable DDL replication, We need to run few SQL scripts(provided under $GG_HOME)  on the source database. and update the extract parameter file.

1. Run role_setup.sql where extract is running [ SOURCE ]

conn / as sysdba

 

2. Grant the role to GATE_USER.[SOURCE]

3.Run the marker script:[SOURCE]

4. Run ddl_setup.sql script [ SOURCE ]

@ddl_setup.sql

5. Update the extract parameter file to include DDL

We need to add the command DDL INCLUDE MAPPED OBJNAME <SCHEMA_NAME>.<TABLE_NAME>

It will look as below

No changes required to extract pump and replicat parameter files.

6. Restart the extract [ SOURCE]

Now DDL replication is enabled. Do some DDL changes on source.

The column has been added in target database also.