Steps
for performing an Online change Synchronization through Datapump process
====================================================
Make sure to create a same table structure
on SRC and TRGT and manager process must be running .
Sample Table structure:
===============
Create table sender.empl (empid
number(10),empname varchar2(10),constraint emp_key primary key(empid));
Create table receiver.empl (empid
number(10),empname varchar2(10),constraint emp_key primary key(empid));
Prerequisite:
========
In SRC:
Create a
directories “ mkdir /u01/app/oracle/GG/dirdat/etrail/“
In TRGT:
“ mkdir /u01/app/oracle/GG/dirdat/ptrail/“
for trail file’s location.
On SRC
- GGSCI> add extract extdml, tranlog, Begin now
- GGSCI> add exttrail /u01/app/oracle/GG/dirdat/etrail/et,extract
extdml
3. GGSCI> add extract dpump, EXTTRAILSOURCE
/u01/app/oracle/GG/dirdat/etrail/et
4.
GGSCI> edit params extdml
extract extdml
userid gguser@SRC,password oracle
exttrail /u01/app/oracle/GG/dirdat/etrail/et
table sender.empl;
5. GGSCI> add rmttrail /u01/app/oracle/GG/dirdat/ptrail/rt,
extract dpump
- GGSCI> edit params dpump
Extract dpump
userid gguser@SRC,password oracle
rmthost 192.168.162.13,mgrport 7810
rmttrail /u01/app/oracle/GG/dirdat/ptrail/rt
passthru
table sender.empl;
On TRGT
1.
GGSCI> add replicat repldml,
exttrail /u01/app/oracle/ GG/dirdat/dptrail/rt,checkpointtable gguser.chkptab
2.
GGSCI> edit params repldml
replicat repldml
userid gguser@TRGT,password
oracle
ASSUMETARGETDEFS
MAP sender.empl, TARGET
receiver.empl;
On SRC
- GGSCI > start extract extdml
2. GGSCI> start extract dpump
On TRGT
1. GGSCI> start replicat repldml
Do some insert and update on SRC table
which should be reflected on TRGT automatically.
====================================================
Schema Replication through Datapump
Sample Table structure:
===============
Create table sender.empl (empid
number(10),empname varchar2(10),constraint emp_key unique(empid));
Create table receiver.empl (empid
number(10),empname varchar2(10),constraint emp_key unique(empid));
Create table sender.company (city varchar2(10),pincode
number(10),constraint pin_key unique(pincode));
Create table receiver.company (city varchar2(10),pincode
number(10),constraint pin_key unique(pincode));
Prerequisite:
========
Create a
directories “ mkdir /u01/app/oracle/GG/dirdat/schtrail/“ &
“mkdir /u01/app/oracle/GG/dirdat/schtrail/“ for trail file’s
location.
On SRC
- GGSCI> add extract extp_sch, tranlog, Begin now
- GGSCI> add exttrail /u01/app/oracle/GG/dirdat/schtrail/lt,extract
extp_sch
- GGSCI> add extract
dp_sch, EXTTRAILSOURCE /u01/app/oracle/GG/dirdat/schtrail/lt
- GGSCI> edit params extp_sch
extract extp_dml
userid gguser@SRC,password gguser
exttrail /u01/app/oracle/GG/dirdat/schtrail/lt
Table sender.*;
- GGSCI> add rmttrail /u01/app/oracle/GG/dirdat/schtrail/rt,extract
dp_sch
- GGSCI> edit params dp_sch
extract dpump
userid gguser@SRC,password
gguser
rmthost 192.168.162.13,mgrport 7810
rmttrail /u01/app/oracle/GG/dirdat/schtrail/rt
passthru
table sender.*;
On TRGT
- GGSCI> add replicat repl_sch, exttrail /u01/app/oracle/GG/dirdat/schtrail/rt,checkpointtable
gguser.chkptab
- GGSCI> edit params repl_sch
replicat repl_dml
userid gguser@TRGT,password
gguser
ASSUMETARGETDEFS
MAP sender.*, TARGET
receiver.*;
On SRC
- GGSCI > start extract extp_sch
- GGSCI> start extract dp_sch
On TRGT
- GGSCI> start replicat repl_sch
Do some insert
and update on both the SRC table which should be reflected on TRGT tables
automatically.
No comments:
Post a Comment