Dear Readers,
In this article we will see how to enable DDL Replication in Oracle GoldeGate 12c.
On Source database :
check processes
1 2 3 4 5 |
GGSCI (gg.orcl.com) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DPINT 00:00:00 00:00:04 EXTRACT RUNNING EXTINT 00:00:10 00:00:08 |
On Target database :
1 2 3 4 |
GGSCI (gg2.orcl.com) 1> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING REPINT 00:00:00 00:00:03 |
To Enable DDl replication in 12c we need to add DDL include all param inside extract process(EXTINT)
On Source database :
check table list on SCOTT schema
1 2 3 4 5 6 7 8 9 |
SCOTT> select * from tab; TNAME TABTYPE CLUSTERID -------- ------- ---------- DEPT TABLE EMP TABLE BONUS TABLE SALGRADE TABLE TEST1 TABLE |
On Target database :
Check table list
1 2 3 4 5 6 7 8 9 |
SCOTT> select * from tab; TNAME TABTYPE CLUSTERID -------- ------- ---------- BONUS TABLE DEPT TABLE EMP TABLE SALGRADE TABLE TEST1 TABLE |
On Source GGSCI :
Stop exract process (EXTINT)
1 2 3 4 |
GGSCI (gg.orcl.com) 2> stop extint Sending STOP request to EXTRACT EXTINT ... Request processed. |
Stop datapump process(DPINT)
1 2 3 |
GGSCI (gg.orcl.com) 4> stop dpint Sending STOP request to EXTRACT EXTINT ... Request processed. |
Edit extint param file and add DDL include all
Specify TABLE SCOTT.* to replicate entire schema details to target
1 2 3 4 5 6 7 8 9 10 |
GGSCI (gg.orcl.com) 3> edit param extint EXTRACT EXTINT SETENV(ORACLE_HOME='/oraeng/app/oracle/product/12.1.0') SETENV(ORACLE_SID='ORCL') useridalias ggadmin_src TRANLOGOPTIONS INTEGRATEDPARAMS(MAX_SGA_SIZE 200) EXTTRAIL /oraeng/app/oracle/product/ogg_src/dirdat/lt DDL include all TABLE SCOTT.dept; TABLE SCOTT.*; |
Edit dpint param file
Add Table SCOTT.*
1 2 3 4 5 6 7 |
GGSCI (gg.orcl.com as ggadmin@orcl) 5> edit param dpint EXTRACT DPINT RMTHOST 192.168.0.180,MGRPORT 7809 RMTTRAIL /oraeng/app/oracle/product/ogg_trg/dirdat/rt PASSTHRU TABLE SCOTT.DEPT; TABLE SCOTT.*; |
Start extint process
1 2 3 |
GGSCI (gg.orcl.com) 4> start extint Sending START request to MANAGER ... EXTRACT EXTINT starting |
Start dpint process
1 2 3 4 |
GGSCI (gg.orcl.com) 4> start DPINT Sending START request to MANAGER ... EXTRACT EXTINT starting |
Check process list
1 2 3 4 5 |
GGSCI (gg.orcl.com) 9> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DPINT 00:00:00 00:00:02 EXTRACT RUNNING EXTINT 00:00:09 00:00:04 |
On Source database :
Create new table
1 2 |
SCOTT> create table new_table(sno number); Table created. |
On Target database :
Check table replicated or not
1 2 3 4 5 6 7 8 9 10 11 |
SCOTT> select * from tab; TNAME TABTYPE CLUSTERID ------- ------- ---------- DEPT TABLE EMP TABLE BONUS TABLE SALGRADE TABLE TEST1 TABLE DEPT TABLE NEW_TABLE TABLE |
Yes table definition replicated
On source database :
Add new column
1 2 |
SQL> alter table new_table add sname varchar2(10); Table altered. |
On Target database :
check columns in new_table
1 2 3 4 5 |
SCOTT> desc new_table Name Null? Type ----------------------------------------- -------- ---------------------------- SNO NUMBER SNAME VARCHAR2(10) |
On Source database :
add primary key
1 2 |
SCOTT> alter table new_table add primary key(sno); Table altered. |
On target database :
check primary added or not
1 2 3 4 5 |
SCOTT> desc new_table Name Null? Type ----------------------------------------- -------- ---------------------------- SNO NOT NULL NUMBER SNAME VARCHAR2(10) |
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts