OGG同步初始化数据(下)-配置初始化进程方式

查看数据库当前scn

SQL> select to_char(current_scn) from v$database; 

CURRENT_SCN
-----------
2497559

源端配置初始化抽取进程

add extract init_t1, sourceistable
GGSCI> EDIT PARAMS init_t1
EXTRACT init_t1 
USERID ogg,PASSWORD ogg
RMTHOST 10.1.200.99, MGRPORT 7809
RMTFILE ./dirdat/i1,maxfiles 999, megabytes 500
table TEST1.TEST1, SQLPREDICATE 'AS OF SCN 2497559';

目标端配置初始化复制进程

GGSCI (localhost) 1> ADD replicat ri1, specialrun
GGSCI (localhost) 2> edit params ri1
specialrun
end runtime
replicat ri1
userid goldengate, password oggpwd
extfile ./dirdat/i1
map TEST1.TEST1, target TEST1.TEST1;

源端开启初始化抽取进程(源端抽取进程需打开)

start EXTRACT init_t1

源端开启投递进程后,目标端开启初始化复制进程

进入ogg安装目录,执行
./replicat paramfile dirprm/ri1.prm

指定scn号,开启复制进程

start replicat rp1,aftercsn 2497559

Related Posts