黄东旭解析 TiDB 的核心优势
617
2024-02-23
文章来源:https://book.tidb.io/session4/chapter5/from-***-to-tidb.html
业务的发展,以及数据的爆发式增长,公司会面临一轮数据库的垂直拆分和水平拆分。拆分后对代码的侵入性较大,后续的不断扩容让 DBA 的管理成本上升。所以急需既支持关系型数据库 RDBMS 和非关系型数据库 NoSQL 分布式的存储计算引擎。
TiDB 分布式数据库结合了传统的 RDBMS 和 NoSQL 的最佳特性。首先,高度兼容 MySQL 协议,大多数情况代码可以直接迁移到 TiDB 分布式数据库,已经分库分表的实例可以在 TiDB 中进行聚合;同时,TiDB 分布式数据库支持水平弹性扩展,通过简单地增加新节点即可实现 TiDB 分布式数据库的水平扩展,按需扩展计算节点或存储节点,轻松应对高并发、海量数据场景。
所以基于 TiDB 分布式数据库的上述特性,本文将介绍通过 OGG 将 *** 的数据同步到 TiDB 分布式数据库的相关原理及操作步骤。
*** GoldenGate 12.3.0.1.4 for *** on Linux x86-64
*** GoldenGate 12.3.0.1.5 for MySQL-compatible DBs on Linux x86-64
本文档以 *** 11G 数据库为例,对 *** 数据库通过 OGG 同步至 TiDB 分布式数据库中进行说明。
*** 端字符集为 ZHS16GBK。
2.1. 表结构转换
由于 *** 中表数据类型与 TiDB 分布式数据库中数据类型不一致,需要预先进行表结构的转换(可以使用 Navicat 工具)。
2.2. 初始化同步
初始化数据通过 OGG initial load 进程将 *** 数据导入到 TiDB 分布式数据库中,如此时 *** 数据库中仍然有写入操作,则 initial load 开始时间之后的数据变化无法同步,此时需要进行增量的数据同步,且在同步多张表时,每个表同步的时间并不一致。如采用停机同步(同步期间 *** 中表数据不再变化),仅需要进行初始化同步操作。
2.3. 增量数据同步
在初始化同步的基础上进行后续变化的数据同步,需要在初始化同步之前,先开启日志抽取。由于异构平台,无法基于统一时间点完成数据初始导入操作,所以在完成初始化导入操作之后需要完整应用开始 initial load 同步之后的所有 log,此时会存在重复执行的问题,OGG 中通过 handlecolisions 参数处理冲突的场景,保证最终数据的一致性(根据主键或唯一键进行重复的操作可以保证最终数据一致,在缺少主键的场景可能会导致数据重复)。
归档模式
Force logging
ENABLE_GOLDENGATE_REPLICATION 参数为 true (11.2.0.4)
最小补全日志(根据同步数据范围选择)
表级别
Schema 级别
数据库级
用户权限
建议 DBA 角色。
set tidb_constraint_check_in_place = 1;
该参数将 TiDB 分布式数据库中乐观锁模式下的主键冲突检查由 commit 时检查提升为 insert 时检查,在遇到主键冲突时可配置为忽略冲突,否则在遇到主键冲突时无法忽略,复制进程会 abend。仅需在 OGG 复制进程 session 级别设置,通过配置在复制进程参数中实现,无需全局修改。
lower-case-table-names = 1
OGG 复制进程需要该参数设置为 1,tidb 中修改此参数并未产生实际效果变化,仅为实现兼容。
DDL 建表语句需提前转换,并在目标端执行。
如下表的示例:
源端 ***
create table account ( account_number number(10,0), account_balance decimal(38,2), account_trans_ts timestamp(6), account_trans_type varchar2(30), primary key (account_number) using index );目标端 TiDB 分布式数据库
create table account ( account_number int, account_balance decimal(38,2), account_trans_ts timestamp, account_trans_type varchar(30), primary key (account_number));解压安装包
$unzip V975837-01.zip $ ls -l total 1201820 drwxr-xr-x 3 *** oinstall 4096 Apr 16 2018 fbo_ggs_Linux_x64_shiphome -rw-r--r-- 1 *** oinstall 1396 May 10 2018 OGG-12.3.0.1.4-README.txt -rw-r--r-- 1 *** oinstall 293566 May 10 2018 OGG_WinUnix_Rel_Notes_12.3.0.1.4.pdf采用静默安装方式
(1) 编辑应答文件
$vi ./fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp #################################################################### ## Copyright(c) *** Corporation 2017. 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 *** user or an administrator who ## ## own this installation to protect any sensitive input values. ## ## ## #################################################################### #------------------------------------------------------------------------------- # Do not change the following system generated value. #------------------------------------------------------------------------------- ***.install.responseFileVersion=/***/install/rspfmt_ogginstall_response_schema_v12_1_2 ################################################################################ ## ## ## *** GoldenGate installation option and details ## ## ## ################################################################################ #------------------------------------------------------------------------------- # Specify the installation option. # Specify ORA12c for installing *** GoldenGate for *** Database 12c and # ORA11g for installing *** GoldenGate for *** Database 11g #------------------------------------------------------------------------------- INSTALL_OPTION=ORA11g ##此处为 *** 数据库版本,本文档使用 11.2.0.4,此处填写 ORA11G,如果是 12c 版本则填写 ORA12c #------------------------------------------------------------------------------- # Specify a location to install *** GoldenGate #------------------------------------------------------------------------------- SOFTWARE_LOCATION=/home/***/ogg12.3 ##此处为安装路径 #------------------------------------------------------------------------------- # Specify true to start the manager after installation. #------------------------------------------------------------------------------- START_MANAGER=false ##安装完成不启动 mgr 进程,设为 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 *** Database. # Required only if START_MANAGER is true. #------------------------------------------------------------------------------- DATABASE_LOCATION= ################################################################################ ## ## ## Specify details to Create inventory for *** installs ## ## Required only for the first *** 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=(2) 安装
执行 fbo_ggs_Linux_x64_shiphome/Disk1/runInstaller
$./fbo_ggs_Linux_x64_shiphome/Disk1/runInstaller -silent -responseFile /home/***/oggsoft/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp #此处 response 文件不支持相对路径安装完成后日志中会显示如下 successful
The installation of *** GoldenGate Core was successful在指定安装目录中会生成 OGG 相关文件
$ ls -l total 225044 -rwxr-xr-x 1 *** oinstall 426 Oct 15 2010 bcpfmt.tpl -rwxr-xr-x 1 *** oinstall 1725 Oct 15 2010 bcrypt.txt -rwxrwxr-x 1 *** oinstall 1612776 Apr 15 2018 cachefiledump drwxr-xr-x 4 *** oinstall 4096 Jul 28 14:45 cfgtoollogs -rwxrwxr-x 1 *** oinstall 3563576 Apr 15 2018 checkprm -rw-rw-r-- 1 *** oinstall 1021 Apr 15 2018 chkpt_ora_create.sql -rwxrwxr-x 1 *** oinstall 3379568 Apr 15 2018 convchk -rwxrwxr-x 1 *** oinstall 4716080 Apr 15 2018 convprm drwxr-xr-x 2 *** oinstall 4096 Jul 28 14:45 crypto -rwxr-xr-x 1 *** oinstall 159 Oct 15 2010 db2cntl.tpl -rwxrwxr-x 1 *** oinstall 9696 Apr 15 2018 db_upgrade -rw-rw-r-- 1 *** oinstall 455 Apr 15 2018 ddl_cleartrace.sql -rw-rw-r-- 1 *** oinstall 8414 Apr 15 2018 ddl_create.sql -rw-rw-r-- 1 *** oinstall 3176 Apr 15 2018 ddl_ddl2file.sql -rw-rw-r-- 1 *** oinstall 90 Apr 15 2018 ddl_disable.sql -rw-rw-r-- 1 *** oinstall 88 Apr 15 2018 ddl_enable.sql -rw-rw-r-- 1 *** oinstall 2036 Apr 15 2018 ddl_filter.sql -rw-rw-r-- 1 *** oinstall 12220 Apr 15 2018 ddl_ora10.sql -rw-rw-r-- 1 *** oinstall 1725 Apr 15 2018 ddl_ora10upCommon.sql -rw-rw-r-- 1 *** oinstall 13539 Apr 15 2018 ddl_ora11.sql -rw-rw-r-- 1 *** oinstall 12564 Apr 15 2018 ddl_ora9.sql -rw-rw-r-- 1 *** oinstall 216 Apr 15 2018 ddl_pin.sql -rw-rw-r-- 1 *** oinstall 3184 Apr 15 2018 ddl_remove.sql -rw-rw-r-- 1 *** oinstall 1 Apr 15 2018 ddl_session1.sql -rw-rw-r-- 1 *** oinstall 629 Apr 15 2018 ddl_session.sql -rw-rw-r-- 1 *** oinstall 287877 Apr 15 2018 ddl_setup.sql -rw-rw-r-- 1 *** oinstall 8401 Apr 15 2018 ddl_status.sql -rw-rw-r-- 1 *** oinstall 2122 Apr 15 2018 ddl_staymetadata_off.sql -rw-rw-r-- 1 *** oinstall 2118 Apr 15 2018 ddl_staymetadata_on.sql -rw-rw-r-- 1 *** oinstall 2186 Apr 15 2018 ddl_tracelevel.sql -rw-rw-r-- 1 *** oinstall 2133 Apr 15 2018 ddl_trace_off.sql -rw-rw-r-- 1 *** oinstall 2383 Apr 15 2018 ddl_trace_on.sql -rwxrwxr-x 1 *** oinstall 5037440 Apr 15 2018 defgen drwxr-xr-x 2 *** oinstall 4096 Jul 28 14:45 deinstall -rw-rw-r-- 1 *** oinstall 882 Apr 15 2018 demo_more_ora_create.sql -rw-rw-r-- 1 *** oinstall 649 Apr 15 2018 demo_more_ora_insert.sql -rw-rw-r-- 1 *** oinstall 583 Apr 15 2018 demo_ora_create.sql -rw-rw-r-- 1 *** oinstall 504 Apr 15 2018 demo_ora_insert.sql -rw-rw-r-- 1 *** oinstall 3597 Apr 15 2018 demo_ora_lob_create.sql -rw-rw-r-- 1 *** oinstall 1943 Apr 15 2018 demo_ora_misc.sql -rw-rw-r-- 1 *** oinstall 1056 Apr 15 2018 demo_ora_pk_befores_create.sql -rw-rw-r-- 1 *** oinstall 1013 Apr 15 2018 demo_ora_pk_befores_insert.sql -rw-rw-r-- 1 *** oinstall 2305 Apr 15 2018 demo_ora_pk_befores_updates.sql drwxr-xr-x 3 *** oinstall 4096 Jul 28 14:45 diagnostics drwxr-xr-x 3 *** oinstall 4096 Jul 28 14:45 diretc drwxr-xr-x 2 *** oinstall 4096 Jul 28 14:45 dirout drwxr-xr-x 4 *** oinstall 4096 Jul 28 14:45 dirsca -rwxrwxr-x 1 *** oinstall 4272400 Apr 15 2018 emsclnt -rwxrwx--- 1 *** oinstall 12545040 Apr 15 2018 extract -rwxr-xr-x 1 *** oinstall 1968 Oct 15 2010 freeBSD.txt -rwxrwxr-x 1 *** oinstall 4280528 Apr 15 2018 ggcmd -rwxr-xr-x 1 *** oinstall 2303056 Apr 15 2018 ggMessage.dat -rwxr-xr-x 1 *** oinstall 49675440 Apr 15 2018 ggparam.dat -rwxrwx--- 1 *** oinstall 9340192 Apr 15 2018 ggsci drwxr-xr-x 2 *** oinstall 4096 Jul 28 14:45 healthcheck -rwxr-xr-x 1 *** oinstall 299451 Nov 16 2017 help.txt drwxr-xr-x 3 *** oinstall 4096 Jul 28 14:45 install drwxr-x--- 12 *** oinstall 4096 Jul 28 14:45 inventory drwxr-xr-x 7 *** oinstall 4096 Jul 28 14:45 jdk -rwxrwxr-x 1 *** oinstall 144496 Apr 15 2018 keygen -rw-rw-r-- 1 *** oinstall 56 Apr 15 2018 label.sql -rwxrwx--- 1 *** oinstall 102840 Apr 15 2018 libantlr3c.so -rwxrwxr-x 1 *** oinstall 12312 Apr 15 2018 libboost_system-mt.so.1.58.0 -rwxrwx--- 1 *** oinstall 2190856 Apr 15 2018 libdb-6.1.so -rwxrwx--- 1 *** oinstall 2198136 Apr 15 2018 libgglog.so -rwxrwx--- 1 *** oinstall 10524064 Apr 15 2018 libggnnzitp.so -rwxrwx--- 1 *** oinstall 21993240 Apr 15 2018 libggparam.so -rwxrwx--- 1 *** oinstall 210264 Apr 15 2018 libggperf.so -rwxrwx--- 1 *** oinstall 779352 Apr 15 2018 libggrepo.so -rwxrwx--- 1 *** oinstall 1108760 Apr 15 2018 libggssl.so -rwxrwx--- 1 *** oinstall 125624 Apr 15 2018 libggutil.so -rwxrwxr-x 1 *** oinstall 29764432 Apr 15 2018 libicudata.so.56 -rwxrwxr-x 1 *** oinstall 2909360 Apr 15 2018 libicui18n.so.56 -rwxrwxr-x 1 *** oinstall 1995808 Apr 15 2018 libicuuc.so.56 -rwxrwx--- 1 *** oinstall 86960 Apr 15 2018 liblmdb.so -rwxrwxr-x 1 *** oinstall 175136 Apr 15 2018 libPocoCrypto.so.48 -rwxrwxr-x 1 *** oinstall 3079760 Apr 15 2018 libPocoFoundation.so.48 -rwxrwxr-x 1 *** oinstall 373232 Apr 15 2018 libPocoJSON.so.48 -rwxrwxr-x 1 *** oinstall 1326504 Apr 15 2018 libPocoNet.so.48 -rwxrwxr-x 1 *** oinstall 350064 Apr 15 2018 libPocoNetSSL.so.48 -rwxrwxr-x 1 *** oinstall 520864 Apr 15 2018 libPocoUtil.so.48 -rwxrwxr-x 1 *** oinstall 680288 Apr 15 2018 libPocoXML.so.48 -rwxrwx--- 1 *** oinstall 1115360 Apr 15 2018 libudt.so -rwxrwx--- 1 *** oinstall 4782344 Apr 15 2018 libxerces-c-3.1.so -rwxrwxr-x 1 *** oinstall 5025840 Apr 15 2018 logdump -rw-rw-r-- 1 *** oinstall 1553 Apr 15 2018 marker_remove.sql -rw-rw-r-- 1 *** oinstall 3309 Apr 15 2018 marker_setup.sql -rw-rw-r-- 1 *** oinstall 675 Apr 15 2018 marker_status.sql -rwxrwxr-x 1 *** oinstall 6570480 Apr 15 2018 mgr -rwxr-xr-x 1 *** oinstall 41643 Jun 30 2017 notices.txt -rwxrwxr-x 1 *** oinstall 1661024 Apr 15 2018 oggerr drwxr-xr-x 12 *** oinstall 4096 Jul 28 14:45 OPatch -rw-r----- 1 *** oinstall 59 May 30 13:35 oraInst.loc drwxr-xr-x 8 *** oinstall 4096 Jul 28 14:45 oui -rw-rw-r-- 1 *** oinstall 3146 Apr 15 2018 params.sql -rwxrwxr-x 1 *** oinstall 11524576 Apr 15 2018 pmsrvr -rwxr-xr-x 1 *** oinstall 1272 Dec 28 2010 prvtclkm.plb -rwxr-xr-x 1 *** oinstall 9487 May 27 2015 prvtlmpg.plb -rw-rw-r-- 1 *** oinstall 2724 Apr 15 2018 prvtlmpg_uninstall.sql -rw-rw-r-- 1 *** oinstall 1532 Apr 15 2018 remove_seq.sql -rwxrwx--- 1 *** oinstall 10873240 Apr 15 2018 replicat -rwxrwxr-x 1 *** oinstall 1656864 Apr 15 2018 retrace -rw-rw-r-- 1 *** oinstall 3187 Apr 15 2018 role_setup.sql -rw-rw-r-- 1 *** oinstall 35254 Apr 15 2018 sequence.sql -rwxrwxr-x 1 *** oinstall 4659736 Apr 15 2018 server -rwxr-xr-x 1 *** oinstall 4917 Jan 5 2017 SQLDataTypes.h -rwxr-xr-x 1 *** oinstall 248 Oct 15 2010 sqlldr.tpl drwxr-xr-x 3 *** oinstall 4096 Jul 28 14:45 srvm -rwxrwxr-x 1 *** oinstall 759 Oct 15 2010 tcperrs -rwxr-xr-x 1 *** oinstall 37877 Apr 16 2016 ucharset.h -rw-rw-r-- 1 *** oinstall 7341 Apr 15 2018 ulg.sql drwxr-xr-x 7 *** oinstall 4096 Jul 28 14:45 UserExitExamples -rwxr-xr-x 1 *** oinstall 32987 Jun 2 2017 usrdecs.h -rwxr-xr-x 1 *** oinstall 1033 Oct 19 2016 zlib.txt(3) 设置环境变量并将环境变量加入 .bash_profile 中
export LD_LIBRARY_PATH=$ORACLE_HOME/lib(4) 测试能否正常运行,并创建相关目录
$ ./ggsci *** GoldenGate Command Interpreter for *** Version 12.3.0.1.4 OGGCORE_12.3.0.1.0_PLATFORMS_180415.0359_FBO Linux, x64, 64bit (optimized), *** 11g on Apr 15 2018 21:16:09 Operating system character set identified as UTF-8. Copyright (C) 1995, 2018, *** and/or its affiliates. All rights reserved. GGSCI ( hostname ) 1> create subdirs Creating subdirectories under current directory /home/***/ogg12.3 Parameter file /home/***/ogg12.3/dirprm: created. Report file /home/***/ogg12.3/dirrpt: created. Checkpoint file /home/***/ogg12.3/dirchk: created. Process status files /home/***/ogg12.3/dirpcs: created. SQL script files /home/***/ogg12.3/dirsql: created. Database definitions files /home/***/ogg12.3/dirdef: created. Extract data files /home/***/ogg12.3/dirdat: created. Temporary files /home/***/ogg12.3/dirtmp: created. Credential store files /home/***/ogg12.3/dircrd: created. Masterkey wallet files /home/***/ogg12.3/dirwlt: created. Dump files /home/***/ogg12.3/dirdmp: created.*** 端 OGG 完成安装。
(1) 解压安装包
$ unzip V978711-01.zip Archive: V978711-01.zip inflating: ggs_Linux_x64_MySQL_64bit.tar inflating: OGG-12.3.0.1-README.txt inflating: OGG_WinUnix_Rel_Notes_12.3.0.1.5.pdf(2) 将 ggs_Linux_x64_MySQL_64bit.tar 解压至安装目录即完成安装.
$tar xvf ./ggs_Linux_x64_MySQL_64bit.tar -C /home/tidb/ogg12.3(3) 进入解压目录测试 ggsci 是否能正常运行,并创建相应目录
$ ./ggsci *** GoldenGate Command Interpreter for MySQL Version 12.3.0.1.5 OGGCORE_12.3.0.1.0_PLATFORMS_180501.2124 Linux, x64, 64bit (optimized), MySQL Enterprise on May 2 2018 10:58:16 Operating system character set identified as UTF-8. Copyright (C) 1995, 2018, *** and/or its affiliates. All rights reserved. GGSCI ( hostname ) 1> create subdirs Creating subdirectories under current directory /home/tidb/ogg12.3 Parameter file /home/tidb/ogg12.3/dirprm: created. Report file /home/tidb/ogg12.3/dirrpt: created. Checkpoint file /home/tidb/ogg12.3/dirchk: created. Process status files /home/tidb/ogg12.3/dirpcs: created. SQL script files /home/tidb/ogg12.3/dirsql: created. Database definitions files /home/tidb/ogg12.3/dirdef: created. Extract data files /home/tidb/ogg12.3/dirdat: created. Temporary files /home/tidb/ogg12.3/dirtmp: created. Credential store files /home/tidb/ogg12.3/dircrd: created. Masterkey wallet files /home/tidb/ogg12.3/dirwlt: created. Dump files /home/tidb/ogg12.3/dirdmp: created.OGG TiDB 分布式数据库端安装完成 (OGG For MySQL 版本)。
(1) 设置 lower-case-table-names 参数为 1
$grep lower-case-table-names tidb.toml lower-case-table-names = 1(2) 检查参数是否正确
MySQL [(none)]> show variables like %lower%; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | lower_case_table_names | 1 | | lower_case_file_system | 1 | +------------------------+-------+ MySQL [(none)]> show variables like %place% ; +--------------------------------+-------+ | Variable_name | Value | +--------------------------------+-------+ | tidb_constraint_check_in_place | 0 | +--------------------------------+-------+(3) 创建用于同步的用户并赋权
MySQL [scott]> create user tidb identified by tidb; Query OK, 1 row affected (0.01 sec) MySQL [scott]> GRANT ALL PRIVILEGES ON scott.* to oggadmin ; Query OK, 0 rows affected (0.01 sec) MySQL [scott]> show create user tidb; +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | CREATE USER for tidb@% | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | CREATE USER tidb@% IDENTIFIED WITH mysql_native_password AS *465D123EE55795DBDBDAE36AFD3DCD9C429B718A REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)(4) 创建对应表结构
4.1 查看数据库是否开启归档
SQL> archive log list;若归档没有开启,需要开启归档
(1) 关闭数据库
SQL> shutdown immediate;(2) 将数据库启动到 mount 状态
SQL> startup mount;(3) 开启数据库的归档
SQL> alter database archivelog;(4) 打开数据库
SQL> alter database open;(5) 归档状态
SQL> archive log list;4.2 开启数据级别的最小增量日志
(1) 查询是否开启增量日志
select log_mode,supplemental_log_data_min,force_logging from v$database;(2) 开启 force logging
开启强同步,会记录所有的事务日志以及数据导入的日志,即使用户设置了 nolog 也会记录。
SQL> ALTER DATABASE FORCE LOGGING;(3) 附加增量日志
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; SQL> ALTER SYSTEM SWITCH LOGFILE;(4) 数据库中允许启动 OGG
SQL> alter system set enable_goldengate_replication=true;4.3 创建 ogg 专属账户
创建 goldengate 用户,并赋予相关权限
SQL> create tablespace goldengate datafile /opt/***/data/goldengate001.dbf size 4G; SQL> create user goldengate identified by goldengate default tablespace goldengate; SQL> grant dba to goldengate;(1) 在 ggsic 中创建免密登录秘钥
./ggsci create subdirs add credentialstore alter credentialstore add user goldengate,password goldengate(2) 直接执行下面命令即可在 ogg 中登录到 goldengate 用户
dblogin useridalias goldengate强烈建议开启 schema 级别的附加日志,因为这样能够确保 schema 下新表的附加日志也会被自动捕获
(1) 若数据库版本低于 11.2.0.2,则需要打 *** Patch 13794550
若以前的 *** 数据库版本没有打上面的补丁,开启 schema 级别附加日志会报如下错误:
ERROR OGG-06522 Cannot verify existence of table function that is required to ADD schema level supplemental logging, failed.
(2) GGSCI 登录有两种方式
1) dblogin userid goldengate, password goldengate
2) dblogin useridalias goldengate
(3) 为指定 schema 开启日志捕获
ADD SCHEMATRANDATA schema ALLCOLS
当没有启动 schema 级别的附加日志时,可以使用基于表级别的附加日志
(1) GGSCI 登录
dblogin userid goldengate, password goldengate(2)为指定 schema 开启日志捕获
ADD TRANDATA schema.tablename NOKEY基本配置中,主要是两套进程:
INITIAL LOAD:即全量同步,主要是一个抽取进程和应用进程,将存量数据从原端同步到目标端。
CHANGE SYNCHRONIZATION:即增量同步进程,有三个进程,抽取进程(捕获源端数据实时变化日志,并生成 trail 文件。*** 数据库的话为 *** 的 redo log 和 archive log),投递进程(将抽取进程产生的 trail 文件投递到目标端,给应用进程回放),应用进程(回放投递进程投递过来的日志文件,应用到目标数据库)
本地配置参数说明:
参数值参数说明/opt/***/11.2.0为 ORACLE_HOME 的值ora为 *** 的 sid 名称ext_ora抽取进程名称tdpm_ora投递进程名称rep_ora应用进程名称./dirdat/sk抽取文件存放目录及命名规则/Data/tidb/ogg/dirdat/skReplicat 端接收日志的存放目录版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。