广告
返回顶部
首页 > 资讯 > 数据库 >怎么部署SharePlex环境
  • 163
分享到

怎么部署SharePlex环境

2024-04-02 19:04:59 163人浏览 泡泡鱼
摘要

这篇文章主要讲解了“怎么部署SharePlex环境”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么部署SharePlex环境”吧!目标在 linux 系统

这篇文章主要讲解了“怎么部署SharePlex环境”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么部署SharePlex环境”吧!

目标在 linux 系统下安装 oracle;利用 SharePlex 实现数据同步;可复制 DML 和 DDL 操作

一、环境描述


源端目标端
操作系统linux 7.6linux 7.6
IP192.168.66.111192.168.66.112
数据库版本19.3.0.0.019.3.0.0.0

二、数据库准备

  1. 创建shareplex专用表空间

    create tablespace splex_tbs datafile '/oradata/datafile/splex_tbs01.dbf' size 1G;
  2. 数据库开归档

  3. 开启补充日志

    alter database add supplemental log data (primary key, unique index) columns;

二、SharePlex 安装(源 & 目标)

  1. 解压安装
    使用oracle用户解压,安装。

    node1-orcl[oracle]/home/oracle>./SharePlex-9.2.1-b39-ONEOFF-rhel-amd64-m64.tpm
    Unpacking ..................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ..........................................................................
      ................................
    SharePlex installation program:
        SharePlex Version: 9.2.1
        Build platfORM: rhel-amd64
        Target platform: lin-amd64
    Please enter the product directory location? /home/oracle/splex/soft
    Please enter the variable data directory location? /home/oracle/splex/data
    Please specify the SharePlex Admin group (select a number):
    1. [oinstall]
    2. dgdba
    3. kmdba
    4. backupdba
    5. dba
    6. oper
    ?  5
    Please enter the tcp/IP port number for SharePlex communications? [2100] 
    Preparing to install SharePlex v.9.2.1:
        User:                     oracle
        Admin Group:              dba
        Product Directory:        /home/oracle/splex/soft
        Variable Data Directory:  /home/oracle/splex/data
    Proceed with installation? [yes] 
    Installing ................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      ...............................
    Setting file ownerships ...................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      ............................................
    Setting file permissions ..................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .........................................................................
      .............................................
    Do you have a valid SharePlex v. 9.2.1 license? [yes] 
    Please enter the License key? 序列号
    Please enter the customer name associated with this license key? CHINA MINISTRY OF RaiLWAY
    SharePlex v. 9.2.1 license validation successful:
        Customer Name:      CHINA MINISTRY OF RAILWAY
        License Key:        序列号
        Product Name:       SharePlex for Oracle - RAC
        License Key Type:   "Perpetual Key"
    NOTE: You can upgrade this license key or add license keys for additional Machines
          by executing utility /home/oracle/splex/soft/install/splex_add_key.
    Installation log saved to: /home/oracle/.shareplex/INSTALL-SharePlex-9.2.1-1911290513.log
    SharePlex v.9.2.1 installation successful.
  2. ora_setup配置
    配置shareplex,配置时如果需要自定义复制的源与目标端的ORACLE_SID,则需要配置tnsnames.ora别名,且/etc/oratab中必须有对应于自定义的tnsnames别名的ORACLE_SID。

    node1-orcl[oracle]/home/oracle/splex/soft/bin>./ora_setup
    Welcome to the Oracle SharePlex setup process for port 2100.
    This process creates tables and user accounts needed to run
    Oracle SharePlex replication.
    Will the SharePlex install be using a BEQUEATH connection? (Entering 'n' implies a sql*net connection)  [y] : 
    Please note the following:
    ** In response to prompts, a carriage return will choose the default
       given in brackets.  If there is no default, a reply must be entered.
    ** To exit the program while the program is waiting for input, use the
       CTRL-C key sequence.
       This sequences can be entered by holding down the CONTROL key and
       pressing the C key.
    Enter the Oracle SID for which SharePlex should be installed [orcl] : 
    In order to create the SharePlex tables and user account, we must
    connect to the database as a DBA user
    Enter a DBA user for orcl  : system
    Enter passWord for the DBA account, which will not echo : 
    connecting--This may take a few seconds.
    validating user name and password. . . This may take a few seconds.
    SharePlex objects will need to be created under a special
    account.  You can pick an existing user or create a new one.
    Would you like to create a new SharePlex user ? [y] : 
    Enter username for new user [splex/splex] : 
    Warning:  This user is now being granted unlimited tablespace.
    This privilege will remain in effect until it is explicitly changed.
    Granting select on sys.user$ to splex
    SPLEX_ROLE_BOTH  already exists; continuing setup . . .
    Do you want to enable replication of tables with TDE? [n] : 
    To enable replication of tables with TDE in the future, please rerun ora_setup.
    Setup will now install SharePlex objects.
    These are the existing tablespaces.
    SYSTEM SYSAUX UNDOTBS1 TEMP USERS SPLEX_TBS 
    Enter the default tablespace for use by SharePlex [USERS] : SPLEX_TBS
    Enter the temporary tablespace for use by SharePlex [TEMP] : 
    Enter the index tablespace for use by SharePlex [ ] : SPLEX_TBS
    Creating SharePlex objects [Installation type: Fresh]. . .
    Creating SharePlex Oracle-timezone-region map . . . Done.
    Creating Conflict Resolution Package . . . Done.
    Creating SharePlex Dataequator package . . . 
    Loading Compare Package from "/home/oracle/splex/soft/util/sp_deq_pkg.plb"...Done.
    Note: The SharePlex object that supports replication of SDO_GEOMETRY cannot be installed
          because the Oracle Spatial and Graph feature is not installed.
    Do you want to continue with the setup without support for SDO_GEOMETRY? [n] : y
    Will the current setup for sid: [orcl] be used as source (including cases as source for failover or master-master setups)?  [y] : 
    Setup of SharePlex objects successful . . .
    Changing SharePlex connection database . . .
    Setup of orcl completed successfully
    -- The datasource identifier in the SharePlex configuration is 'o.orcl' --
  3. sp_cop -u 2300 & 启动
    可以使用该参数指定 shareplex 启动到指定的 IP 上,可以使用 netstat -an | grep <port_number>
    启动 -u可以启动shareplex实例到指定端口,可以复制多个库。

    node1-orcl[oracle]/home/oracle/splex/soft/bin>./sp_cop &
    [1] 2672
    node1-orcl[oracle]/home/oracle/splex/soft/bin>
    *******************************************************
    * SharePlex for Oracle Startup 
    * Copyright 2018 Quest Software Inc.
    * ALL RIGHTS RESERVED.
    * Protected by U.S. Patents: 7,461,103 and 7,065,538
    * Version: 9.2.1.39-m64-ONEOFF-SPO17172-SPO17624C-SPO17384-SPO17377-oracle
    * VarDir : /home/oracle/splex/data
    * Port   : 2100
    *
    * IMPORTANT SECURITY NOTICE:
    *
    * YOU HAVE NOT YET SELECTED THE NETWORK SECURITY MODEL.
    * PLEASE RUN:
    *
    *     sp_security --setup
    *
    * TO SELECT YOUR NETWORK SECURITY MODEL.
    *******************************************************
  4. 状态验证

    node1-orcl[oracle]/home/oracle/splex/soft/bin>./sp_ctrl
    *******************************************************
    * SharePlex Command Utility
    * Copyright 2018 Quest Software Inc.
    * ALL RIGHTS RESERVED.
    * Protected by U.S. Patents: 7,461,103 and 7,065,538
    *******************************************************
    sp_ctrl (node1:2100)> status
    Brief Status for node1
    Process          State                             PID     Running   Since     
    ---------------  ------------------------------  --------  --------------------
    Cop              Running                             2672  29-Nov-19 05:18:20  
    Cmd & Ctrl       Running                             2696  29-Nov-19 05:18:34  
    There are no active configuration files

三、同步配置

  1. 创建配置文件(源数据库)

    1. sp_ctrl控制台
      SharePlex日常操作都在sp_ctrl控制台中进行,启动命令为:/<prodir>/bin/sp_ctrl,一般启动之后首先进入控制台执行sp_ctrl > stop post,停止。

      sp_ctrl (node2:2100)> stop post
    2. config 配置文件
      Config配置文件为复制链路需要复制对象以及链路映射文件。

      1. 列出config文件

        sp_ctrl (node1:2100)> list config   # 列出config文件
        File   Name                                         State       Datasource     
        --------------------------------------------------  ----------  ---------------
        ORA_config                                          Inactive    o.SOURCE_SID   
        Last Modified At: 26-Nov-19 09:13    Size: 151
      2. 复制修改配置文件

        sp_ctrl (node1:2100)> copy config ORA_config to test_config # 复制config文件
        sp_ctrl (node1:2100)> edit config test_config # 修改config文件
        datasource:o.orcl
        #source tables      target tables           routing map
        #splex.demo_src      splex.demo_dest            target_system:进程名@o.target_sid
        expand hr.%                hr.%                    192.168.66.112:splex_hr@o.orcl
        • splex.demo_src --源库的用户名.表名,可以使用%通配符,全匹配半匹配等。priv%not(table_name)排除表。

        • splex.demo_dest --目标库的用户名.表名

        • target_system@o.target_sid --目标库的IP或hosts文件中映射名@为目标端的sid或别名。

        • hr.test hr.test 192.168.204.151:scott_tab@o.honor1 --IP或主机名后加冒号,可以为该表复制单独起一个队列。

        • mary.cust2!key(c1,c2) mary.cust2 proda@o.sid --自定义pk

      3. config 生效

        sp_ctrl (node1:2100)> activate config test_config
      4. 验证Capture、Read和Export进程是否被创建

        sp_ctrl (node1:2100)> show 
        Process    Source                               Target                 State                   PID
        ---------- ------------------------------------ ---------------------- -------------------- ------
        Capture    o.orcl                                                      Running               60407
        Read       o.orcl                                                      Running               60423
        Export     node1                                node2                  Running               60438
        sp_ctrl (node1:2100)> show capture detail
        Host: node1     System time: 28-Nov-19 10:17:58
                                   Operations
        Source     Status            Captured Since
        ---------- --------------- ---------- ------------------
        o.orcl     Running                  0 28-Nov-19 09:34:52
           Oracle current redo log          : 25
           Capture current redo log         : 25
           Capture log offset               : 10206852
           Last change processed:           
                Operation on SHAREPLEX internal table at 11/28/19 10:17:55
           Capture state                    : Processing
           Activation id                    : 2
           Error count                      : 0
           Operations captured              : 0
           Transactions captured            : 0
           Concurrent sessions              : 0
           HWM concurrent sessions          : 2
           Checkpoints performed            : 23
           Total operations processed       : 3948
           Total transactions completed     : 3948
           Total Kbytes read                : 0
           Redo records in progress         : 0
           Redo records processed           : 18556
           Redo records ignored             : 14608
           Redo records - last HRID         : N/A
        sp_ctrl (node1:2100)> show export
        Host   : node1
        Queue  : node1
                                   Kbytes
        Target     Status          Exported     Since              Total       Backlog
        ---------- --------------- ------------ ------------------ ---------- ----------
        node2      Running                   12 28-Nov-19 09:34:56          0          0
        sp_ctrl (node1:2100)>
    3. 同步数据

    4. 开启同步(目标端)

      1. 设置恢复的起点(源端需要有数据流入)

        sp_ctrl (node2:2100)> reconcile queue splex_hr for o.orcl-o.orcl scn 1573836
      2. 开启同步

        sp_ctrl (node2:2100)> start post

感谢各位的阅读,以上就是“怎么部署SharePlex环境”的内容了,经过本文的学习后,相信大家对怎么部署SharePlex环境这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!

您可能感兴趣的文档:

--结束END--

本文标题: 怎么部署SharePlex环境

本文链接: https://www.lsjlt.com/news/63546.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 怎么部署SharePlex环境
    这篇文章主要讲解了“怎么部署SharePlex环境”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么部署SharePlex环境”吧!目标在 Linux 系统...
    99+
    2022-10-18
  • centos怎么部署php环境
    本教程操作环境:CentOS 7系统、PHP8.1版、Dell G3电脑。centos怎么部署php环境?centos安装php环境这次给大家说说我安装部署php环境(我已经成功在使用)1、首先进行yum安装扩展yum install li...
    99+
    2022-10-25
  • centos怎么部署node.js环境
    本篇内容主要讲解“centos怎么部署node.js环境”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“centos怎么部署node.js环境”吧!一 打开cen...
    99+
    2022-11-30
    centos node.js
  • Linux系统环境怎么部署
    本篇内容介绍了“Linux系统环境怎么部署”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!以阿里云为例,默认第一位就是CentOS,提供了从7...
    99+
    2023-06-16
  • Linux环境下GRE怎么部署
    今天小编给大家分享一下Linux环境下GRE怎么部署的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。GRE(Windows不支...
    99+
    2023-06-26
  • tomcat+mysql怎么部署jsp环境
    tomcat+mysql怎么部署jsp环境,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。tomcat+mysql部署jsp环境我的JSP源...
    99+
    2022-10-19
  • Linux中怎么部署Kettle环境
    本篇文章为大家展示了Linux中怎么部署Kettle环境,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。在Linux上部署Kettle环境首先我们有一个正常安装的,桌...
    99+
    2022-10-18
  • Python环境部署
    安装python2.7,安装在默认位置;配置python的Path环境变量C:\Python27;在cmd中输入python可以看到python安装成功,可以直接在cmd中运行python代码;用命令行写代码时无法保存代码,我们需要保存代码...
    99+
    2023-01-31
    环境 Python
  • docker怎么部署php开发环境
    要部署PHP开发环境,可以使用Docker来创建一个容器化的PHP开发环境。以下是一些步骤: 安装Docker:首先,你需要在你...
    99+
    2023-10-23
    docker php
  • 怎么用tomcat+mysql部署jsp环境
    本篇内容介绍了“怎么用tomcat+mysql部署jsp环境”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!...
    99+
    2022-10-18
  • centos怎么搭建部署docker环境
    这篇文章主要介绍“centos怎么搭建部署docker环境”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“centos怎么搭建部署docker环境”文章能帮助大家解决问题。1、Docker的存在解决的...
    99+
    2023-07-02
  • CDH环境怎么搭建及部署
    本文小编为大家详细介绍“CDH环境怎么搭建及部署”,内容详细,步骤清晰,细节处理妥当,希望这篇“CDH环境怎么搭建及部署”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。一、概述Cloudera版本(Cloudera...
    99+
    2023-06-27
  • mac怎么部署php环境变量
    这篇文章主要介绍“mac怎么部署php环境变量”,在日常操作中,相信很多人在mac怎么部署php环境变量问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”mac怎么部署php环境变量”的疑惑有所帮助!接下来,请跟...
    99+
    2023-06-20
  • mac 部署python环境
    Python中最连接Mysql常用的驱动是mysql-python :mysql的C语言的驱动 mysql-connector:msql官方的驱动 pymysql:python语言的驱动我这里安装的是 mysql-python终端中执行pi...
    99+
    2023-01-31
    环境 mac python
  • vps部署golang环境
    随着互联网的快速发展,越来越多的人开始关注Linux系统下的服务器应用开发,而Golang作为一种高性能的编程语言,受到了越来越多的关注。那么,如何在VPS上部署Golang环境呢?本文将对这个问题进行详细介绍。一、安装Golang在VPS...
    99+
    2023-05-14
  • python 虚环境部署
    #!/bin/bashyum install -y python-virtualenv.noarchyum install -y git.x86_6mkdir -p /home/himalayas/virtualenv/python2.6-...
    99+
    2023-01-31
    环境 python
  • linux环境部署redis
    Redis是一个开源的使用ANSI C语言编写、遵守BSD协议、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。解压缩,进入redis目录 make && make install ...
    99+
    2023-06-05
  • java虚拟主机环境怎么部署
    部署Java虚拟主机环境的步骤如下:1. 安装JDK:首先需要安装Java Development Kit(JDK),可以从官网下载...
    99+
    2023-05-31
    java虚拟主机 java 虚拟主机
  • 怎么用Docker快速部署GPU环境
    这篇文章主要为大家展示了“怎么用Docker快速部署GPU环境”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“怎么用Docker快速部署GPU环境”这篇文章吧。在 Linux 服务器上使用 GPU...
    99+
    2023-06-15
  • 怎么实现云主机环境部署
    要实现云主机环境的部署,可以按照以下步骤进行操作:1. 选择云服务提供商:根据自己的需求和预算选择一个云服务提供商。2. 注册账号并...
    99+
    2023-09-20
    云主机
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作