zoukankan      html  css  js  c++  java
  • 在docker中安装ogg19

    1.docker安装oracle11g

    docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
    
    docker run -d -p 1521:1521 --name oracle11g --privileged registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
    
    docker start oracle11g
    
    docker exec -it oracle11g bash
    

    2.上传ogg到oracle服务器,并配置swap

    docker cp  /oggtest/fbo_ggs_Linux_x64_shiphome/Disk1  oracle11g:/ogghome
    docker exec -it oracle11g bash
    [root@9f83a6076e06 ~]# dd if=/dev/zero of=/swapfile bs=1024 count=512k
    524288+0 records in
    524288+0 records out
    536870912 bytes (537 MB) copied, 1.38129 s, 389 MB/s
    [root@9f83a6076e06 ~]# mkswap /swapfile
    mkswap: /swapfile: warning: don't erase bootbits sectors
            on whole disk. Use -f to force.
    Setting up swapspace version 1, size = 524284 KiB
    no label, UUID=1b0bd019-90f1-49fb-935b-6a6c6015a0c9
    [root@9f83a6076e06 ~]# swapon /swapfile
    [root@9f83a6076e06 ~]# chown -R oracle:oinstall /ogghome/
    

    3.静默安装ogg

    编辑响应文件

    [oracle@c075234ac240 ogghome]$ cat response/oggcore.rsp 

    ####################################################################
    ## Copyright(c) Oracle Corporation 2019. All rights reserved.     ##
    ##                                                                ##
    ## Specify values for the variables listed below to customize     ##
    ## your installation.                                             ##
    ##                                                                ##
    ## Each variable is associated with a comment. The comment        ##
    ## can help to populate the variables with the appropriate        ##
    ## values.                                                        ##
    ##                                                                ##
    ## IMPORTANT NOTE: This file should be secured to have read       ##
    ## permission only by the oracle user or an administrator who     ##
    ## own this installation to protect any sensitive input values.   ##
    ##                                                                ##
    ####################################################################
    
    #-------------------------------------------------------------------------------
    # Do not change the following system generated value. 
    #-------------------------------------------------------------------------------
    oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v19_1_0
    
    
    ################################################################################
    ##                                                                            ##
    ## Oracle GoldenGate installation option and details                          ##
    ##                                                                            ##
    ################################################################################
    
    #-------------------------------------------------------------------------------
    # Specify the installation option.
    # Specify ORA19c for installing Oracle GoldenGate for Oracle Database 19c or
    #         ORA18c for installing Oracle GoldenGate for Oracle Database 18c or
    #         ORA12c for installing Oracle GoldenGate for Oracle Database 12c or
    #         ORA11g for installing Oracle GoldenGate for Oracle Database 11g 
    #-------------------------------------------------------------------------------
    INSTALL_OPTION=ORA11g
    
    #-------------------------------------------------------------------------------
    # Specify a location to install Oracle GoldenGate
    #-------------------------------------------------------------------------------
    SOFTWARE_LOCATION=/ogghome/ogghome
    
    #-------------------------------------------------------------------------------
    # Specify true to start the manager after installation. 
    #-------------------------------------------------------------------------------
    START_MANAGER=false
    
    #-------------------------------------------------------------------------------
    # Specify a free port within the valid range for the manager process.
    # Required only if START_MANAGER is true.
    #-------------------------------------------------------------------------------
    MANAGER_PORT=
    
    #-------------------------------------------------------------------------------
    # Specify the location of the Oracle Database.
    # Required only if START_MANAGER is true.
    #-------------------------------------------------------------------------------
    DATABASE_LOCATION=
    
    
    ################################################################################
    ##                                                                            ##
    ## Specify details to Create inventory for Oracle installs                    ##
    ## Required only for the first Oracle product install on a system.            ##
    ##                                                                            ##
    ################################################################################
    
    #-------------------------------------------------------------------------------
    # Specify the location which holds the install inventory files.
    # This is an optional parameter if installing on
    # Windows based Operating System.
    #-------------------------------------------------------------------------------
    INVENTORY_LOCATION=
    
    #-------------------------------------------------------------------------------
    # Unix group to be set for the inventory directory.  
    # This parameter is not applicable if installing on
    # Windows based Operating System.
    #-------------------------------------------------------------------------------
    UNIX_GROUP_NAME=oinstall
    

      主要是:SOFTWARE_LOCATION=/ogghome/ogghome

    START_MANAGER=false

    UNIX_GROUP_NAME=oinstall

    安装

    [oracle@c075234ac240 ogghome]$ ./runInstaller -silent -responseFile /ogghome/response/oggcore.rsp 
    Starting Oracle Universal Installer...
    
    Checking Temp space: must be greater than 120 MB.   Actual 21477 MB    Passed
    Checking swap space: must be greater than 150 MB.   Actual 511 MB    Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-03-11_11-53-17AM. Please wait ...[oracle@c075234ac240 ogghome]
    $ You can find the log of this install session at: /ogghome/oraInventory/logs/installActions2021-03-11_11-53-17AM.log
    The installation of Oracle GoldenGate Core was successful.
    Please check '/ogghome/oraInventory/logs/silentInstall2021-03-11_11-53-17AM.log' for more details.
    
    As a root user, execute the following script(s):
    	1. /ogghome/oraInventory/orainstRoot.sh
    
    
    
    Successfully Setup Software.
    

      中间的问题记录:

    1.安装目录必须是空文件夹

    2.响应文件要用绝对地址

    3.使用--privileged选项运行容器,才有权限建立swap

    失败,因为ogghome路径下有文件
    Checking Temp space: must be greater than 120 MB.   Actual 23398 MB    Passed
    Checking swap space: must be greater than 150 MB.   Actual 511 MB    Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-03-11_10-54-34AM. Please wait ...[oracle@9f83a6076e06 Disk1]$ 
    [WARNING] [INS-75003] The specified directory /ogghome is not empty.   CAUSE: The directory specified /ogghome contains files.
       ACTION: Clean up the specified directory or enter a new directory location.
    [FATAL] [INS-32035] The location (/home/oracle/app/oraInventory) specified for the central inventory is not empty.
       CAUSE: The specified central inventory location is either locked by different install session, or the location specified does not h
    ave write permissions for the logs.   ACTION: Specify an empty location for the inventory.
    [FATAL] [INS-32037] The operating system group specified for central inventory (oraInventory) ownership is invalid.
       CAUSE: No value specified for central inventory (oraInventory) ownership group.
       ACTION: Specify an operating system group whose members should have write permission to the central inventory directory (oraInvento
    ry).A log of this session is currently saved as: /tmp/OraInstall2021-03-11_10-54-34AM/installActions2021-03-11_10-54-34AM.log. Oracle reco
    mmends that if you want to keep this log, you should move it from the temporary location.
    失败,因为响应文件使用了相对路径
    [oracle@9f83a6076e06 Disk1]$ ./runInstaller -silent -responseFile response/oggcore.rsp
    Starting Oracle Universal Installer...
    
    Checking Temp space: must be greater than 120 MB.   Actual 23398 MB    Passed
    Checking swap space: must be greater than 150 MB.   Actual 511 MB    Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-03-11_10-53-06AM. Please wait ...[oracle@9f83a6076e06 Disk1]$ 
    [FATAL] [INS-10101] The given response file response/oggcore.rsp is not found.   CAUSE: The given response file is either not accessible or do not exists.
       ACTION: Give a correct response file location. (Note: relative path is not supported)
    A log of this session is currently saved as: /tmp/OraInstall2021-03-11_10-53-06AM/installActions2021-03-11_10-53-06AM.log. Oracle reco
    mmends that if you want to keep this log, you should move it from the temporary location.
    失败,因为没有使用--privileged
    [oracle@c0996a2a0138 Disk1]$ ./runInstaller -silent -responseFile response/oggcore.rsp
    Starting Oracle Universal Installer...
    
    Checking Temp space: must be greater than 120 MB.   Actual 25498 MB    Passed
    Checking swap space: 0 MB available, 150 MB required.    Failed <<<<
    
    Some requirement checks failed. You must fulfill these requirements before
    
    continuing with the installation,
    
    
    Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2021-03-11_10-22-12AM/installActions2021-03-11
    _10-22-12AM.log
    
    问题:swap空间没有
    https://blog.csdn.net/qq_35893120/article/details/80655645
    [oracle@c0996a2a0138 ogghome]$ su - root
    Password: 
    [root@c0996a2a0138 ~]# dd if=/dev/zero of=/swapfile bs=1024 count=512k
    524288+0 records in
    524288+0 records out
    536870912 bytes (537 MB) copied, 1.73282 s, 310 MB/s
    [root@c0996a2a0138 ~]# mkswap /swapfile
    mkswap: /swapfile: warning: don't erase bootbits sectors
            on whole disk. Use -f to force.
    Setting up swapspace version 1, size = 524284 KiB
    no label, UUID=bd389b64-a142-4583-9e27-da465ddc197c
    [root@c0996a2a0138 ~]# swapon /swapfile
    swapon: /swapfile: swapon failed: Operation not permitted
    又有问题:
    使用–privileged选项运行容器
    

    4.源端Oracle配置

    --创建独立的表空间
    create tablespace ATMV datafile '/home/oracle/app/oracle/oradata/helowin/ATMV.dbf' size 100m autoextend on next 50m maxsize unlimited;
     --创建ogg_test用户,密码也为ogg_test
    create user ogg_test identified by ogg_test default tablespace ATMV;
     --给ogg_test赋予充分的权限
    grant connect,resource,dba to ogg_test;
     --检查附加日志情况
    Select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI, SUPPLEMENTAL_LOG_DATA_FK, SUPPLEMENTAL_LOG_DATA_ALL from v$database;
     --增加数据库附加日志
    alter database add supplemental log data;
    alter database add supplemental log data (primary key, unique,foreign key) columns;
     --rollback
    alter database drop supplemental log data (primary key, unique,foreign key) columns;
    alter database drop supplemental log data;
     --全字段模式,注意:在该模式下的delete操作也只有主键值,如果需要其他值,须在source端extract配置NOCOMPRESSDELETES
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
     --开启数据库强制日志模式
    alter database force logging;
     --安装sequence support
    --@sequence.sql 这一步失败了,不用管
    

     

    [oracle@c075234ac240 ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 11 13:16:25 2021
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> @sequence.sql
    SP2-0310: unable to open file "sequence.sql"
    SQL> alter table sys.seq$ add supplemental log data (primary key) columns;
    
    Table altered.
    
    SQL> 
    

    5.源端Ogg mgr进程配置

    Version 11.2.1.0.3版本的OGG需要执行这些内容

    GGSCI (c075234ac240) 2> edit params mgr

    PORT 7839
    DYNAMICPORTLIST  7840-7849
    USERID ogg_test, PASSWORD ogg_test
    PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS 7
    LAGREPORTHOURS 1
    LAGINFOMINUTES 30
    LAGCRITICALMINUTES 45
    PURGEDDLHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 7
    PURGEMARKERHISTORY MINKEEPDAYS 3, MAXKEEPDAYS 7
    

    GGSCI (c075234ac240) 3> start mgr
    Manager started.


    GGSCI (c075234ac240) 4> info mgr

    Manager is running (IP port TCP:c075234ac240.7839, Process ID 1207).

    6.源端Ogg extract进程配置

    7.源端Ogg pump进程配置

     

    We only live once, and time just goes by.
  • 相关阅读:
    [ jquery 文档处理 replaceWith(content|fn) replaceAll(content) ] 此方法用于把所有匹配的元素替换成指定的HTML或DOM元素
    [ jquery 文档处理 wrapInner(htm|element|fnl) ] 此方法用于把所有匹配的元素的子元素(包括文本节点)使用指定的 HTML 元素来包裹
    [ jquery 文档处理 wrapAll(html|ele)) ] 此方法用于把所有匹配的元素使用指定的 HTML 元素来包裹
    [ jquery 文档处理 wrap(html|element|fn) ] 此方法用于把所有匹配的元素用其他元素的结构化标记包裹起来
    [ jquery 文档处理 insertBefore(content) before(content|fn) ] 此方法用于把所有匹配的元素插入到另一个、指定的元素元素集合的前面,实现外部插入
    [ jquery 文档处理 insertAfter(content) after(content|fn) ] 此方法用于把所有匹配的元素插入到另一个、指定的元素元素集合的后面,实现外部插入
    [ jquery 文档处理 prependTo(content) ] 此方法用于把所有匹配的元素前置到另一个、指定的元素元素集合中
    剑指 Offer 55
    剑指 Offer 54. 二叉搜索树的第k大节点 树的遍历
    剑指 Offer 52. 两个链表的第一个公共节点 哈希
  • 原文地址:https://www.cnblogs.com/jycjy/p/14517060.html
Copyright © 2011-2022 走看看