你好,游客 登录 注册 搜索
背景:
阅读新闻

GoldenGate安装简单笔记

[日期:2016-11-15] 来源:Linux社区  作者:杨建荣 [字体: ]

GoldenGate这些年在数据迁移中是大放光彩,简称OGG,对于很多DBA来说,学会这项技能也会给自己加分不少。
Oracle在10g开始推出的GRID的概念,分为了以下四个层面。
 存储层面 ASM
数据库服务 RAC
应用 Stream
管理 Grid Control
现在来看看这四个方面的发展,ASM如果说在10g是试水,那么在11g中是走向成熟,12c作为标配。RAC呢,自不必说,其实已经远远超出了它本身的含义,数据库的组件那么多,唯独这个组件是很多大企业的首选,第二个应该才是ADG,然后是数据管理方面,有着Grid Control,这些年也在不断的改进,现在叫做EM12c了,而原本在10g单机版的EM功能在11g做了筛减,到了12c里面,单机版的是Express版本,就是最精简版本,而丰富的功能放到哪儿去了,都到企业版的EM12c中,而EM12c现在也像一个航母一般,承载了不只是Oracle,而是更多的功能。说法上面三个,来说说落寞的Stream,stream是10g推出的一大闪亮特性,是oracle自开发的数据同步工具,免费,功能也强大,支持异步,但是命途多舛,一来有着数据库平台的限制(只能是Oracle),二来有更强大的内部竞争对手,2009年GoldenGate是什么时候正式入主Oracle的,其性能优于stream,原理和stream差不多,更强大的是支持的不只是Oracle,支持的数据库种类实在是太全面了,当然它是收费的,不过也丝毫掩盖不了它本身的优点,到了12c里面,stream几乎不被提及,已经逐步开始弃用。
    值得一提的是,GoldenGate的产品还是有个分界线的。对于10g及以下的版本支持截止到下面的安装版本。
Alert! OGG 11.2.1.0.22 is -not- available for Oracle Database 10g. Oracle GoldenGate 11.2.1.0.20 is the Terminal Release for support of Oracle Database 10g.
    而对于11g,12c的数据库版本,则有另外的安装版本。其实这个似乎也不难理解,GoldenGate归入Oracle阵营,必然得按照Oracle的思路来用。所以如果你对于安装Oracle在行,那么OGG不用看什么文档,也能是轻车熟路。不信我们看看。
    我是打算使用静默安装的,Oracle中会有一个响应文件,而GoldenGate中也是如此,官网下载安装包之后,解压,目录结构和Oracle几乎一样,也有一个response的目录。
    不过要安装填写的内容倒不多,我简单填写的内容如下:
[oracle@newtest response]$ cat oggcore.rsp |grep \=
 oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v12_1_2
 INSTALL_OPTION=ORA11g
 SOFTWARE_LOCATION=/home/oracle/ogg/ogg_work
 START_MANAGER=true
 MANAGER_PORT=1530
 DATABASE_LOCATION=/U01/app/oracle/product/11.2.0.4
 INVENTORY_LOCATION=/home/oracle/oraInventory
 UNIX_GROUP_NAME=oinstall
数据库版本的选项如下,这里不存在兼容性,只有11g,12c。
#-------------------------------------------------------------------------------
# Specify the installation option.
 # Specify ORA12c for installing Oracle GoldenGate for Oracle Database 12c and
 #        ORA11g for installing Oracle GoldenGate for Oracle Database 11g
 #-------------------------------------------------------------------------------
而安装过程就是静默方式,指定响应文件即可。
oracle@newtest Disk1]$ ./runInstaller  -responseFile  /home/oracle/ogg/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp -ignoreSysPrereqs  -silent
 Starting Oracle Universal Installer...
 Checking Temp space: must be greater than 120 MB.  Actual 5764 MB    Passed
 Checking swap space: must be greater than 150 MB.  Actual 16499 MB    Passed
 Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-11-10_10-50-15PM. Please wait ...[oracle@newtest Disk1]$ You can find the log of this install session at:
整个过程非常流程,没几秒钟就输出了成功的日志。
Please check '/home/oracle/oraInventory/logs/silentInstall2016-11-10_10-50-15PM.log' for more details.
 Successfully Setup Software.
然后我们配置一下环境变量,LD_LIBRARY_PATH是需要的
 一个简单的配置样例如下:
export PATH
 export ORACLE_BASE=/U01/app/oracle
 export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4
 #export ORACLE_HOME=$ORACLE_BASE/product/10.2.0.5
 export ORACLE_SID=newtest2
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib
 export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:/home/oracle/ogg/ogg_work:$PATH
 export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
 export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
 export TNS_ADMIN=/U01/app/oracle/product/11.2.0.4/network/admin/
 umask 022
 stty erase ^h

否则,肯定使用ggsci的时候会有如下的报错。
$ ggsci
 ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory 
安装过程很快就完成了,我们来简单配置一下工作目录。
 创建OGG的工作目录

GGSCI (newtest.oracle.com) 2> create subdirs
 Creating subdirectories under current directory /home/oracle/ogg/ogg_work
 Parameter files                /home/oracle/ogg/ogg_work/dirprm: already exists
 Report files                  /home/oracle/ogg/ogg_work/dirrpt: already exists
 Checkpoint files              /home/oracle/ogg/ogg_work/dirchk: already exists
 Process status files          /home/oracle/ogg/ogg_work/dirpcs: already exists
 SQL script files              /home/oracle/ogg/ogg_work/dirsql: already exists
 Database definitions files    /home/oracle/ogg/ogg_work/dirdef: already exists
 Extract data files            /home/oracle/ogg/ogg_work/dirdat: already exists
 Temporary files                /home/oracle/ogg/ogg_work/dirtmp: already exists
 Credential store files        /home/oracle/ogg/ogg_work/dircrd: already exists
 Masterkey wallet files        /home/oracle/ogg/ogg_work/dirwlt: already exists
 Dump files                    /home/oracle/ogg/ogg_work/dirdmp: already exists
编辑MGR的信息。
GGSCI (newtest.oracle.com) 1>  EDIT PARAMS MGR
 PORT 1530
简单验证一下端口1530是否开始工作
[oracle@newtest ogg_work]$ netstat -nltp|grep 1530
 (Not all processes could be identified, non-owned process info
  will not be shown, you would have to be root to see it all.)
 tcp        0      0 :::1530                    :::*                        LISTEN      47586/./mgr
查看mgr的状态status mgr或者info mgr都一样
GGSCI (newtest.oracle.com) 1> status mgr
 Manager is running (IP port newtest.oracle.com.1530, Process ID 47586).
后续的配置和原理参考 http://www.linuxidc.com/Linux/2016-11/137173.htm

Oracle GoldenGate 学习教程一:介绍和安装  http://www.linuxidc.com/Linux/2015-08/122146.htm

Oracle GoldenGate 学习教程二、配置和使用  http://www.linuxidc.com/Linux/2015-08/122325.htm

Oracle GoldenGate 学习教程三、加密  http://www.linuxidc.com/Linux/2015-09/122567.htm

Oracle GoldenGate 介绍及安装配置教程 http://www.linuxidc.com/Linux/2015-09/123120.htm

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址http://www.linuxidc.com/Linux/2016-11/137174.htm

linux
相关资讯       GoldenGate安装 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款