GoldenGate架构下的oracle与oracle数据迁移
1:确定数据库版本下载相应的GG软件、开启归档模式、修改归档文件格式、添加附加日志、创建安装目 录、解压软件、设置变量并初始化GG、创建管理用户ggm并授权。(这部分操作可以按照之前发布的 安装论文操作);
2:配置manager管理进程 $GG_HOME/ggsci> edit manager mgr
port 7809
start mgr
info mgr
3: 准备目标用户和对象 set long 999
set pagesize 99
set heading off
set feedback off
spool /tmp/s1.sql rep
select replace(dbms_metadata.get_ddl('TABLE','DEPT'),'SCOTT','S1')||';'from dual;
spool off
ho sed '/^SQL>/d' -i /tmp/s1.sql
grant connect,resource to S1 identified by tiger;
start /tmp/s1.sql
4: 增加表级别附加日志 GGSCI>dblogin userid ggm@updb,password oracle
GGSCi>list tables scott.*
GGSCI>info trandata scott.dept
GGSCI>add trandata scott.dept
5: 配置抓取进程 GGSCI>add extract eupdba,sourceistable
GGSCI>edit params eupdba
extract eupdba
userid ggm,password oracle
rmthost upgg(目标主机名),mgrpt 7809
rmttask replicat,group rupgg(目标应用进程)
table SCOTT.DEPT;
view params eupdba
6: 配置复制进程(另一台主机)GGSCI>info mgr
GGSCI>add replicat rupgg,specialrun
GGSCI>edit params rupgg
replicat rupgg
userid ggm,password oracle
assumetargetdefs
map SCOTT.DEPT,target S1.DEPT;
GGSCI> view params rupgg
7: 源端主机启动抓取进程 GGSCI>start extract eupdba
GGSCI>info extract eupdba
GGSCI>view report eupdba
8: 目标端主机查看 GGSCI>info replicat rupgg
GGSCI>view report rupgg