OGG新增同步表

同步表添加附加日志

1
GGSCI>add trandata test.tab2

抽取进程和投递进程参数添加同步表

1
2
3
4
GGSCI>edit params EXTEST01
Table test.tab2;
GGSCI>edit params PUTEST01
Table test.tab2;

目标端停止进程

1
GGSCI>stop RETEST01

源端查看当前SCN

1
2
SQL> col scn for 9999999999999999
SQL> select dbms_flashback.get_system_change_number scn from dual;

源端根据SCN导出同步表

1
$ expdp '\sys/luhengxing as sysdba'\ DIRECTORY=DMP_DIR DUMPFILE=OGG.DMP LOGFILE=OGG.LOG CLUSTER=N FLASHBACK_SCN=100000 TABLES=TEST.TAB1

目标端导入同步表数据

1
$ impdp '\sys/luhengxing as sysdba'\ DIRECTORY=DMP_DIR DUMPFILE=OGG.DMP LOGFILE=OGG.LOG CLUSTER=N TABLE_EXISTS_ACTION=replace remap_tablespace=TEST:TEST remap_schema=TEST:TEST 

复制进程参数添加同步表

1
2
GGSCI>edit params RETEST01
Map test.tab2,target test.tab2, filter ( @getenv('TRANSACTION', 'CSN') > 9490772077906) ;

Tips:filter参数需要在进程下一次重启前取消

启动复制进程

1
GGSCI>start RETEST01
comments powered by Disqus