Dear all,
I just need some help in setting my configuration right - Here's what I have done so far.
Both the Source and Target databases are Oracle 12c (non-cdb) and are hosted on Oracle Linux 5.8 64bit VMs.
On Source (MUMBAIHOST)
Adding Primary Extract (DDLTEST)
GGSCI 86> edit params ddltest
Extract ddltest
Userid gguser, password oracle_4U
ExtTrail ./dirdat/dl
DDL INCLUDE ALL
TABLE DEMO.*;
GGSCI> Add Extract DDLTEST, TranLog, Begin Now
GGSCI> Add ExtTrail ./dirdat/dl, Extract DDLTEST
Adding Secondary Extract i.e. Pump process (DDLPUMP)
GGSCI> Extract ddlpump
userid gguser, password oracle_4U
RMTHOST PUNEHOST, MGRPORT 15001
RmtTrail ./dirdat/dp
DDL INCLUDE ALL
TABLE DEMO.*;
GGSCI> Add RMTTRAIL ./dirdat/dp, Extract DDLPUMP
This DEMO schema has already been created and has some tables in it.
Target Side(PUNEHOST)
Then on target side I added following Replicat process named - REPDDL
GGSCI> edit params DDL
Replicat repddl
USERID gguser, password oracle_4U
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/repddl, Purge
DDL INCLUDE ALL
DDLERROR DEFAULT IGNORE
MAP DEMO.*, TARGET DEMO1.*;
GGSCI> Add Replicat repddl, ExtTrail ./dirdat/dp
So far DDL replication is running fine, whenever I am creating a new table on Source side, it's structure is getting created on target side. Something like following -
On Source -
SQL> create table emp (name varchar2(10), salary number(10));
Table created.
SQL> insert into emp values ('Abc',5000);
1 row created.
SQL> commit;
Commit complete.
SQL> select name from v$database;
NAME
---------
MUMBAI
SQL> select * from emp;
NAME SALARY
---------- ----------
Abc 5000
SQL> show user
USER is "DEMO"
I can see the table and it's structure created on my Pune database but my data is missing.
On Target-
SQL> desc emp
Name Null? Type
----------------------------------------- -------- ----------------------------
NAME VARCHAR2(10)
SALARY NUMBER(10)
SQL>
SQL> select * from emp;
no rows selected
SQL> show user
USER is "DEMO1"
SQL> select name from v$database;
NAME
---------
PUNE
Just for making it short, I haven't included any GGSCI output, but please assume that the Extracts(Primary+Pump) and Replicat processes are running fine. i.e. None got ABENDED.
How can I ensure continuous DDL and DML replication for this setup? Could anyone please help? Thank you!
For e.g. Here's what I want to achieve, whenever I create any table on the source side, it must be replicated on the target side and whenever I add any data to the table on source must also be replicated on the target side and this must be real time and as-need basis.
P.S - Please don't suggest initial load, I have already done that.