日期:2014-05-16 浏览次数:20383 次
GG →→ ogg112101_fbo_ggs_Linux_x86_ora10g_32bit
需要注意的是、数据库版本不同的话、Golden Gate也要选择相对应的版本
㈠ 首先,将安装文件解压缩至/u01/app/oracle/ggs
[oracle@Think vmshare]$ unzip ogg112101_fbo_ggs_Linux_x86_ora10g_32bit.zip -d /u01/app/oracle/ggs/ [oracle@Think ggs]$ tar -xvof fbo_ggs_Linux_x86_ora10g_32bit.tar
㈡ 设置相应的环境变量,建议使用 oracle 用户安装
[oracle@Think ~]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 [oracle@Think ~]$ export PATH=$ORACLE_HOME/bin:/u01/app/oracle/ggs:$PATH [oracle@Think ~]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u01/app/oracle/ggs
㈢ 进入 GoldenGate 命令行模式,创建子 GoldenGate 的工作子目录
[oracle@Think ~]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO Linux, x86, 32bit (optimized), Oracle 10g on Apr 23 2012 07:06:02 Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. GGSCI (Think) 1> create subdirs Creating subdirectories under current directory /home/oracle Parameter files /home/oracle/dirprm: created Report files /home/oracle/dirrpt: created Checkpoint files /home/oracle/dirchk: created Process status files /home/oracle/dirpcs: created SQL script files /home/oracle/dirsql: created Database definitions files /home/oracle/dirdef: created Extract data files /home/oracle/dirdat: created Temporary files /home/oracle/dirtmp: created Stdout files /home/oracle/dirout: created
㈣ 接下来、需要在Oracle数据库中创建一个专属用户,用于 GoldenGate Manager进程,Extract进程和Replicat进程
idle> conn / as sysdba Connected. sys@ORCL> create tablespace ggs_data datafile size 80M; Tablespace created. sys@ORCL> create user ogg identified by ogg default tablespace ggs_data; User created. sys@ORCL> grant connect,resource to ogg; Grant succeeded. sys@ORCL> grant select any dictionary,select any table to ogg; Grant succeeded. sys@ORCL> grant create table to ogg; Grant succeeded. sys@ORCL> grant flashback any table to ogg; Grant succeeded. sys@ORCL> grant execute on dbms_flashback to ogg; Grant succeeded. sys@ORCL> grant execute on utl_file to ogg; Grant succeeded.
㈤ 确认我们刚才创建的ogg用户能够登入RDBMS
[oracle@Think ggs]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO Linux, x86, 32bit (optimized), Oracle 10g on Apr 23 2012 07:06:02 Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. GGSCI (Think) 1> DBLOGIN USERID ogg,PASSWORD ogg Successfully logged into database.
㈥ 在数据库级别创建supplemental log、否则、唤醒Extract进程时会报错
sys@ORCL> ALTER DATA