异构环境的单项复制(支持DDL复制)

Oracle Golden gate 12版本已经很长世间了,对比前几个版本变化很大。在安装过程已经摈弃了原有命令行形式,采用了与Oracle DB以及weblogic一样的图形解决,在界面上可以选择对应数据库版本的ogg。

下面就为大家介绍一下新版的ogg的安装实施过程。我们采用linux+oracle11g和solairs+12c的异构环境搭建,先完成单向复制再扩展为支持DDL操作。

1、项目背景

异构环境的单项复制(支持DDL复制)


2、源装ogg

2.1   编辑oracle用户的.profile 增加环境变量

export PATH=$ORACLE_HOME/bin:/oracle/ogg:$PATH

#set OGG LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/oracle/ogg:$ORACLE_HOME/lib:$LD_LIBRARY_PATH

安装的过程就比较简单,类似我们安装数据库 ,运行runInstaller 命令调用OUI界面。

[oracle@node01 Disk1]$ ls

install response runInstaller stage

[oracle@node01 Disk1]$ ./runInstaller

3、目标端安装ogg

编辑oracle用户的 .profile 增加环境变量

PATH=$PATH:/usr/local/bin:/usr/ccs/bin:$ORACLE_HOME/bin:/oracle/ogg

#set ogg

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32

安装过程,如同源端

$ ls

install response runInstaller stage

$ ls -l

total 8

drwxr-xr-x 4 oracle oinstall 512 Dec 16 2015 install

drwxrwxrwx 2 oracle oinstall 512 Dec 16 2015 response

-rwxr-xr-x 1 oracle oinstall 918 Dec 16 2015 runInstaller

drwxr-xr-x 11 oracle oinstall 512 Dec 16 2015 stage

$ ./runInstaller

4、测试ogg

· 源端ogg

异构环境的单项复制(支持DDL复制)


异构环境的单项复制(支持DDL复制)


异构环境的单项复制(支持DDL复制)


异构环境的单项复制(支持DDL复制)

· 目标端ogg

异构环境的单项复制(支持DDL复制)


异构环境的单项复制(支持DDL复制)


异构环境的单项复制(支持DDL复制)

5、创建ogg用户

5.1、源端数据库

点击(此处)折叠或打开

SQL> create tablespace ogg datafile '/oracle/database/oradata/inds/ogg.dbf' size 200m;

Tablespace created.

SQL> create user ogg identified by ogg default tablespace ogg;

User created.

SQL> grant connect ,resource,unlimited tablespace to ogg;

Grant succeeded.

SQL> grant execute on utl_file to ogg;

Grant succeeded.

SQL> grant select any dictionary,select any table to ogg;

Grant succeeded.

SQL> grant alter any table to ogg;

Grant succeeded.

SQL> grant flashback any table to ogg;

Grant succeeded.

SQL> grant execute on DBMS_FLASHBACK to ogg;

Grant succeeded.

SQL> show parameter enable_goldengate

NAME TYPE VALUE

------------------------------------ ---------------------- ------------------------------

enable_goldengate_replication boolean FALSE

SQL>grant dba to ogg;

Grant succeeded.

登陆源端Oracle GoldenGate,测试并确认可以访问数据库

异构环境的单项复制(支持DDL复制)



5.2、目标端数据库

点击(此处)折叠或打开

SQL> create tablespace ogg datafile '/oracle/appnewdb/oradata/mynewdb/ogg.dbf' size 200m;

Tablespace created.

SQL> create user ogg identified by ogg default tablespace ogg;

User created.

SQL> grant connect ,resource,unlimited tablespace to ogg;

Grant succeeded.

SQL> grant execute on utl_file to ogg;

Grant succeeded.

SQL> grant select any dictionary,select any table to ogg;

Grant succeeded.

SQL> grant alter any table to ogg;

Grant succeeded.

SQL> grant flashback any table to ogg;

Grant succeeded.

SQL> grant execute on DBMS_FLASHBACK to ogg;

Grant succeeded.

SQL> show parameter enable_goldengate

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

enable_goldengate_replication boolean FALSE

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/08733fbb2f2aef9dbdd56384c25facb5.html