Oracle Golden Gate DDL Replication
Replicate DDL changes seamlessly with GoldenGate.
Data Definition Language (DDL) replication is the process of replicating database schema changes, such as creating, dropping, and modifying tables, views, and other objects, from one database to another. In this article, we will discuss the basics of Oracle Golden Gate DDL replication
Quick start with DDL Replication
You can enable DDL replication by simply adding below to extract parameter file
DDL INCLUDE MAPPED
Note: Do not use DDL INCLUDE ALL until it is really required.
Now if you add new column on source table, it will reflect on target too
ALTER TABLE table_name ADD col_namecol_definition;
Configure Golden Gate DDL Replication
Create a test table on source for the purpose of testing DDL replication
![oracle golden gate ddl replication - create table](https://static.wixstatic.com/media/29860b_25ce142b2b7f42ffac170c6f2f0335f6~mv2.png/v1/fill/w_59,h_26,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_25ce142b2b7f42ffac170c6f2f0335f6~mv2.png)
Create table on target with same structure as source
![oracle golden gate ddl replication - setup ddl replication](https://static.wixstatic.com/media/29860b_e7bdbad803d3497da620855a611c75d6~mv2.png/v1/fill/w_59,h_28,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_e7bdbad803d3497da620855a611c75d6~mv2.png)
On source, add supplemental logging for the table
![oracle golden gate ddl replication - supplemental logging](https://static.wixstatic.com/media/29860b_7708a6c8962a4b58afd701894fa14ac1~mv2.png/v1/fill/w_57,h_15,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_7708a6c8962a4b58afd701894fa14ac1~mv2.png)
Add the extract
![oracle golden gate ddl replication - add the extract](https://static.wixstatic.com/media/29860b_3d2b1accfec94c4e85521d2cde16e125~mv2.png/v1/fill/w_57,h_6,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_3d2b1accfec94c4e85521d2cde16e125~mv2.png)
Register the extract and edit parameters to add DDL INCLUDE MAPPED
![oracle golden gate ddl replication - register the extract and edit parameters](https://static.wixstatic.com/media/29860b_b9a5f4673d5741d78b91057658bdb126~mv2.png/v1/fill/w_57,h_26,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_b9a5f4673d5741d78b91057658bdb126~mv2.png)
Add data pump process
![oracle golden gate ddl replication - data pump process](https://static.wixstatic.com/media/29860b_8e4082a94efc492fb91fab91bf2f5424~mv2.png/v1/fill/w_57,h_16,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_8e4082a94efc492fb91fab91bf2f5424~mv2.png)
![oracle golden gate ddl replication - data pump process parameters](https://static.wixstatic.com/media/29860b_f623e35e84d54045a7e3be039c70e325~mv2.png/v1/fill/w_57,h_16,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_f623e35e84d54045a7e3be039c70e325~mv2.png)
Start the extract and pump process
![oracle golden gate ddl replication - start extract on source](https://static.wixstatic.com/media/29860b_8c91adce3c524a64ba2dded03fd3ba9a~mv2.png/v1/fill/w_63,h_19,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_8c91adce3c524a64ba2dded03fd3ba9a~mv2.png)
Let us add replicat on target
![oracle golden gate ddl replication - add replicat on target](https://static.wixstatic.com/media/29860b_5042456f366b4703918240c36faf3db6~mv2.png/v1/fill/w_63,h_7,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_5042456f366b4703918240c36faf3db6~mv2.png)
Below are the parameters used for rep12
![oracle golden gate ddl replication - edit replicate parameters](https://static.wixstatic.com/media/29860b_9a2ed4b8b6b5490e88bd33d94859296c~mv2.png/v1/fill/w_63,h_17,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_9a2ed4b8b6b5490e88bd33d94859296c~mv2.png)
Start replicat process on target
![oracle golden gate ddl replication - start replicat process on target](https://static.wixstatic.com/media/29860b_ed67205c49c34230b58e70cfa56696a2~mv2.png/v1/fill/w_53,h_13,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_ed67205c49c34230b58e70cfa56696a2~mv2.png)
Test DDL Replication
Let us add a column on the source table
![oracle golden gate ddl replication - edit source table](https://static.wixstatic.com/media/29860b_82873bc07d02405090d219434a8d6c16~mv2.png/v1/fill/w_63,h_25,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_82873bc07d02405090d219434a8d6c16~mv2.png)
Check the extract stats
![oracle golden gate ddl replication - stats extract](https://static.wixstatic.com/media/29860b_3e32606cdc3841bc9b250ad9062fff73~mv2.png/v1/fill/w_63,h_26,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_3e32606cdc3841bc9b250ad9062fff73~mv2.png)
Check the pump stats
![oracle golden gate ddl replication - stats pump](https://static.wixstatic.com/media/29860b_174e3c6742024ef48d941ef7788a93e5~mv2.png/v1/fill/w_63,h_20,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_174e3c6742024ef48d941ef7788a93e5~mv2.png)
Check the replicat stats
![oracle golden gate ddl replication - stats replicat](https://static.wixstatic.com/media/29860b_d1e4aa6b81a044b4bc8a2cdc69df2f78~mv2.png/v1/fill/w_63,h_44,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_d1e4aa6b81a044b4bc8a2cdc69df2f78~mv2.png)
Now check the target table if the new column is added or not
![oracle golden gate ddl replication - check target table definition](https://static.wixstatic.com/media/29860b_2de21cae32b34e4a8a07aeace55cf82a~mv2.png/v1/fill/w_63,h_21,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/29860b_2de21cae32b34e4a8a07aeace55cf82a~mv2.png)