GoldenGate架构下oracle与oracle数据迁移
主机updba上scott用户下数据同步到主机upgg上scott.
1: updba和upgg上scott数据一致。(可通过迁移实现)
2: 并在两个主机上分别安装GG软件、创建管理用户ggm授权。
3:配置manager管理进程 GGSCI>edit params mgr
port 7809
GGSCI>info mgr
GGSCI>start mgr
GGSCI>info mgr
4: 配置DML同步
4.1 抓取进程 GGSCI>add extract escott,tranlog,begin now
GGSCI>info extract escott
GGSCI>edit params escott
extract escott
userid ggm,password oracle
rmthost upgg,mgrport 7809
rmttrail ./dirdat/es *trail文件夹
table scott.dept;
GGSCI>add rmttrail ./dirdat/es, extract escott
GGSCI>info rmttrail ./dirdat/es
GGSCI>info extract escott,detail
4.2 配置trail(目标端) GGSCI> edit params ./GLOBALS
GGSCHEMA GGM
CHECKPOINTTABLE GGM.CKPTAB
GGSCI> dblogin userid ggm,password oracle
GGSCI> add checkpointtable ckptab
4.3 复制进程(目标端) GGSCI> add replicat rscott, exttrail ./dirdat/es
GGSCI> edit params rscott
replicat rscott
userid ggm,password oracle
handlecollisions
assumetargetdefs
discardfile ./dirrpt/rscott.dsc,purge
map scott.dept,target scott.dept;
4.4 启动复制 (目标端) GGSCI>start replicat rscott
GGSCI>info replicat rscott
4.5 启动抓取(源端)GGSCI> start extract escott
GGSCI> info extract escott
4 验证同步效果
源端: update\insert commit后查看目标端是否有变化