In previous example we just loaded the table and that task is only one time.
In this example , we will configure a continuous synchronisation for the same myobj table.
- Create a GoldenGate Checkpoint table
- Create an Extract group
- Create a parameter file for the online Extract group
- Create a Trail
- Create a Replicat group
- Create a parameter file for the online Replicat group
On Source | Steps | On Target | Steps |
Create CheckPoint Table |
ggsci> EDIT PARAMS ./GLOBALS ###add the following two lines global params file ### GGSCHEMA GGS_OWNER CHECKPOINTTABLE GGS_OWNER.CHKPTAB ggsci> stop mgr |
||
Create a Primary Extract Group |
ggsci> ADD EXTRACT ext2, TRANLOG, BEGIN NOW ggsci> ADD RMTTRAIL /u01/ggt_target/dirdat/rt, EXTRACT EXT2 ggsci> EDIT PARAMS ext2 ###add the following lines in params file### EXTRACT ext2 USERID ggs_owner, PASSWORD ggs_owner RMTHOST targethost, MGRPORT 7809 RMTTRAIL /u01/ggt_target/dirdat/rt TABLE test.myobj; |
Create a Replicate Group |
ggsci> DBLOGIN USERID ggs_owner, PASSWORD ggs_owner ggsci> ADD CHECKPOINTTABLE GGS_OWNER.CHKPTAB ggsci> ADD REPLICAT rep2, EXTTRAIL /u01/ggt_target/dirdat/rt CHECKPOINTTABLE CHKPTAB ggsci> edit params rep2 ###add the following lines in params file#### REPLICAT rep2 ASSUMETARGETDEFS USERID ggs_owner, PASSWORD ggs_owner MAP test.myobj, TARGET test.myobj; |
Start extract and check status |
ggsci> START EXTRACT ext2 ggsci> status extract ext2 ggsci> info extract ext2, detail |
Start replicat and check status |
ggsci> START replicat rep2 ggsci> status replicate ext2 ggsci> info replicat ext2, detail |
Perform any DML Operation |
delete from test.myobj where rownum < 1000; commit; |
||
Check the data | select count(*) from myobj; | Check the Data | select count(*) from myobj; |
Follow Me!!!