1、停止抽取进程
stop e_tb
edit params e_tb
--20191025 add
table h2.t_rpt;
table h2.t_store;
2、打开表级附加日志
dblogin userid ogg password ogg;
ADD TRANDATA h2.t_rpt
ADD TRANDATA h2.t_store
3、stop 投递进程
stop p_tb
edit params p_tb
--20191025 add
table h2.t_rpt;
table h2.t_store;
4、停止r进程
stop r_tb
5、从源端导出数据,导入到目标端
查询源端数据库scn
col current_scn for 9999999999999999
select current_scn from v$database;
15585673221354
expdp \" / as sysdba \" directory=a_li tables=h2.t_rpt,h2.t_store dumpfile=h2_1025.dmp logfile=h2_1025.log compression=all FLASHBACK_SCN=15585673221354
impdp \" / as sysdba \" directory=a_li table_exists_action=replace dumpfile=h2_1025.dmp logfile=h2_1025.log compression=all FLASHBACK_SCN=15585673221354
GGSCI (B) 2> edit param r_tb
--20191025 add
MAP h2.t_rpt,TARGET h2.t_rpt,FILTER(@GETENV('TRANSACTION','CSN')>15585673221354);
MAP h2.t_store,TARGET h2.t_rpt,FILTER(@GETENV('TRANSACTION','CSN')>15585673221354);
--对于这条语句,如果使用的11g的ogg,需要使用双引号"transaction","csn",如果使用的是12c的ogg使用单引号
--否则报错:OGG-01298 Oracle GoldenGate Delivery for Oracle, rep_t1.prm: Column function diagnostic message: could not find column "transaction".
6、启动进程
start r_tb
start p_tb
start e_tb
来源:https://blog.csdn.net/hnlivingyang/article/details/102746289