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.配置管理进程的参数文件[所有节点]: