Oracle--ogg(goldengate)

ogg安装配置过程:

1.将ogg压缩包上传到oracle家目录:

scp ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip oracle@oracle0:/home/oracle/
scp ogg112101_fbo_ggs_Linux_x64_ora10g_64bit.zip oracle@172.25.254.250:/home/oracle/

2.解压缩:
mkdir -p /home/oracle/insogg/
unzip /home/oracle/ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip -d /home/oracle/insogg/
mkdir -p /home/oracle/ogg/
tar -xvf /home/oracle/insogg/fbo_ggs_Linux_x64_ora11g_64bit.tar -C /home/oracle/ogg

3.在source和target将/home/oracle/ogg加入环境变量PATH
PATH=$ORACLE_HOME/bin:/home/oracle/ogg:$PATH
source ~/.bashrc

4.创建ogg需要的子目录[所有节点]:必须在/home/oracle/ogg目录下启动ggsci
ggsci
GGSCI (oracle0.example.com) 1> create subdirs

5.在数据库中创建ogg的管理用户[所有节点]
grant connect,
resource,
unlimited tablespace,
select any dictionary,
select any table,
alter any table,
flashback any table
to ggs
identified by ggs;

grant execute on dbms_flashback to ggs;
grant execute on utl_file to ggs;
grant select any dictionary to scott;

grant insert any table,
update any table,
delete any table
to ggs;

6.准备测试用的数据
打开追加日志数据模式
alter database add supplemental log data;

准备测试用的表
create table scott.e01 as select * from scott.emp;
alter table scott.e01 add constraint pk_e01_empno primary key (empno);

将源表的数据导入到目标库
172.25.254.250:
exp scott/tiger tables=e01 file=e01.dmp
scp e01.dmp oracle@172.25.0.10:/home/oracle
172.25.0.10:
imp scott/tiger tables=e01 file=e01.dmp

7.在ogg中添加需要同步的表:在源端添加
GGSCI (foundation0.ilt.example.com) 1> dblogin userid ggs, password ggs
GGSCI (foundation0.ilt.example.com) 2> add trandata scott.e01
GGSCI (foundation0.ilt.example.com) 3> info trandata scott.e01
GGSCI (foundation0.ilt.example.com) 3> info trandata scott.*

8.目标端添加checkpoint表:
vi /home/oracle/ogg/GLOBALS
------------------------------
checkpointtable ggs.checkpoint
------------------------------
GGSCI (oracle0.example.com) 2> dblogin userid ggs, password ggs
GGSCI (oracle0.example.com) 3> add checkpointtable ggs.checkpoint

9.配置管理进程的参数文件[所有节点]:
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值