1.环境说明
oracle 11.2.0.4
tidb 4.0.0
ogg on oracle 12.2.0.1
ogg on tidb 12.3 (mysql version)
2.安装参考链接:
https://book.tidb.io/session4/chapter5/from-oracle-to-tidb.html
操作步骤在### 5. 进程启动顺序 <<<<==============以上链接的这个章节中启动全量抽取进程出现以下错误
2020-09-11 14:15:00 ERROR OGG-00868 Query to retrieve Octect Length Failed for database=‘ITOM’ AND table=‘TBL_SUBMCHT_INFO01’ AND column=1.
详细日志如下:
Oracle GoldenGate Delivery 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 11:18:24
Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
Starting at 2020-09-11 14:14:55
Operating System Version:
Linux
Version #1 SMP Wed Jun 3 14:28:03 UTC 2020, Release 3.10.0-1127.10.1.el7.x86_64
Node: node1
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 58877
Description:
** Running with the following parameters **
2020-09-11 14:15:00 INFO OGG-03059 Operating system character set identified as UTF-8.
2020-09-11 14:15:00 INFO OGG-02695 ANSI SQL parameter syntax is used for parameter parsing.
2020-09-11 14:15:00 INFO OGG-01360 REPLICAT is running in Remote Task mode.
2020-09-11 14:15:00 INFO OGG-03528 The source database character set, as determined from the table definition file, is UTF-8.
replicat rtinit
sourcedefs ./dirdef/defgen1_oracle.def
targetdb ogg@10.233.27.128:4000 userid ggs password ***
discardfile ./dirrpt/rtinit,purge
map IBXRP_BUCKLE.TBL_SUBMCHT_INFO, target ITOM.TBL_SUBMCHT_INFO01;
2020-09-11 14:15:00 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/home/appl/ogg/product/dirtmp.
Database Version:
MySQL
Server Version: 5.7.25-TiDB-v4.0.2
Client Version: 5.6.14
Host Connection: 10.233.27.128 via TCP/IP
Protocol Version: 10
Database Language and Character Set:
CLIENT CHARACTER SET = “utf8mb4”
SERVER CHARACTER SET = “utf8mb4”
DATABASE CHARACTER SET = “utf8mb4”
LOCALE INFORMATION = “en”
DATABASE COLLATION = “caseinsensitive”
** Run Time Messages **
2020-09-11 14:15:00 WARNING OGG-02761 Source definitions file, ./dirdef/defgen1_oracle.def, is ignored because trail file contains table definitions.
2020-09-11 14:15:00 INFO OGG-06505 MAP resolved (entry IBXRP_BUCKLE.TBL_SUBMCHT_INFO): map “IBXRP_BUCKLE”.“TBL_SUBMCHT_INFO”, target “ITOM”.“TBL_SUBMCHT_INFO01”.
Source Context :
SourceModule : [ggdb.mysql.db]
SourceID : [/scratch/aime/adestore/views/aime_adc4150325/oggcore/OpenSys/src/gglib/ggdbmysql/dbmysql.c]
** Run Time Messages **
2020-09-11 14:15:00 WARNING OGG-02761 Source definitions file, ./dirdef/defgen1_oracle.def, is ignored because trail file contains table definitions.
2020-09-11 14:15:00 INFO OGG-06505 MAP resolved (entry IBXRP_BUCKLE.TBL_SUBMCHT_INFO): map “IBXRP_BUCKLE”.“TBL_SUBMCHT_INFO”, target “ITOM”.“TBL_SUBMCHT_INFO01”.
Source Context :
SourceModule : [ggdb.mysql.db]
SourceID : [/scratch/aime/adestore/views/aime_adc4150325/oggcore/OpenSys/src/gglib/ggdbmysql/dbmysql.c]
SourceMethod : [get_target_col_specs]
SourceLine : [2187]
ThreadBacktrace : [19] elements
: [_ZN3ggs5gglib14MultiThreading6Thread9RunThreadEPNS2_10ThreadArgsE]
: [/home/appl/ogg/product/replicat(ggs::gglib::MultiThreading::RunThread(ggs::gglib::MultiThreading::Thread聽]
: [/home/appl/ogg/product/replicat(ggs::gglib::MultiThreading::RunThread(ggs::gglib::MultiThreading::Thread聽]
: [/home/appl/ogg/product/replicat(ggs::gglib::MultiThreading::RunThread(ggs::gglib::MultiThreading::Thread聽]
:
:
:
:
:
: [/home/appl/ogg/product/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0x140) [0x7ea460]]
: [/home/appl/ogg/product/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0x140) [0x7ea460]]
: [/home/appl/ogg/product/replicat(ggs::gglib::Multq]
: [/home/appl/ogg/product/replicat()]
: [/home/appl/ogg/product/replicat(ggs::gglib::Multq]
: [/home/appl/ogg/product/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0x140) [0x7ea460]]
: [/home/appl/ogg/product/replicat(ggs::gglib::Multq]
: [/lib64/libc.so.6(__libc_start_main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/home/appl/ogg/product/replicat()]
2020-09-11 14:15:00 ERROR OGG-00868 Query to retrieve Octect Length Failed for database=‘ITOM’ AND table=‘TBL_SUBMCHT_INFO01’ AND column=1.
全量抽取进程参数
extract etinit
userid ggs,password ggs
rmthost xxxx mgrport 7809
rmttask replicat,group rtinit
table IBXRP_BUCKLE.TBL_SUBMCHT_INFO;
全量同步进程参数
replicat rtinit
sourcedefs ./dirdef/defgen1_oracle.def
targetdb ogg@xxxxxx:4000 userid ggs password ggs
discardfile ./dirrpt/rtinit,purge
map IBXRP_BUCKLE.TBL_SUBMCHT_INFO, target ITOM.TBL_SUBMCHT_INFO01;
问题参考链接:
解决方案中设置参数
lower-case-table-names = 1
表中也有有主键
表结构如下:
CREATE TABLE ITOM.TBL_SUBMCHT_INFO01
( ID int ,
APP_CODE VARCHAR(32),
CHANNEL_MCHT_NO VARCHAR(32),
PAY_WAY VARCHAR(32),
SUB_MCHT_ID VARCHAR(32),
REMARK VARCHAR(128),
LOCAL_MCHT_NO VARCHAR(32),
CREATE_TIME VARCHAR(14),
UPDATE_TIME VARCHAR(14),
primary key(ID));
是否有同行遇到过以上问题?
同样配置在mysql没有重现,在tidb出现这个问题