OGG replicat报错OGG-01004 [SQL error 1406]Data too long for column
ogg 12.1.2.0.1 mysql 5.6.15replicat报错abend,view report 信息如下:
2016-07-07 16:46:35 WARNING OGG-01004 Aborted grouped transaction on 'ctpsp.ss_operating_info', Database error 1406 (Data too long for column 'deptCo
de' at row 1
).
2016-07-07 16:46:35 WARNING OGG-01003 Repositioning to rba 154634 in seqno 8.
2016-07-07 16:46:35 WARNING OGG-01154 SQL error 1406 mapping ctpsp.ss_operating_info to ctpsp.ss_operating_info Data too long for column 'deptCode' a
t row 1.
2016-07-07 16:46:35 WARNING OGG-01003 Repositioning to rba 154634 in seqno 8.
Source Context :
SourceModule :
SourceID :
SourceFunction :
SourceLine :
ThreadBacktrace : elements
: ]
: ]
: [/opt/app/goldengate/libgglog.so(_MSG_ERR_MAP_TO_TANDEM_FAILED(CSourceContext*, ggs::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, ggs
::gglib::ggapp::CQualDBObjName<(DBObjType)1> const&, CMessageFactory::MessageDisposition)+0x83) ]
: [/opt/app/goldengate/replicat(take_rep_err_action(short, int, char const*, extr_ptr_def*, __std_rec_hdr*, char*, file_def*, bool)+0x265d) [
0x53fdcd]]
: ]
: ]
: ]
: [/opt/app/goldengate/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x11a) [0x7051
ca]]
: ]
: ]
: ]
: ]
2016-07-07 16:46:35 ERROR OGG-01296 Error mapping from ctpsp.ss_operating_info to ctpsp.ss_operating_info.
之后我给replicat增加了参数SHOWSYNTAX
使用replicat paramfile ./dirprm/repzx.prm启动进程,得到sql语句如下:
INSERT INTO `ctpsp`.`ss_operating_info` (`id`,`userID`,`creditCode`,`deptName`,`artificialPerson`,`artificialPersonID`,`countryRegion`,`province`,`unitNature`,`areaCode`,`industryCode`,`contactNumber`,`contactAddress`,`zipCode`,`deptCode`,`orgAttachCode`,`licNumber`,`licAttachCode`,`taxNumber`,`taxAttchCode`,`SpoAttachCode`,`comRegNo`,`comRegNoCode`,`openingBank`,`basicAccount`,`regCapital`,`regCapCurrency`,`regUnit`,`infoReporter`,`infoReporterPhone`,`mainTypes`,`version`,`platformName`,`platformCode`,`platfVerifier`,`platfVerifierTime`,`basicInfoState`,`idAttachCode`,`whetherObtaining`,`u_creatTime`,`u_creatUser`,`u_updateTime`,`u_updateUser`,`u_deleteState`,`u_version`,`u_char1`,`u_char2`,`u_char3`,`u_char4`,`u_char5`,`u_char6`,`u_char7`,`u_date8`,`u_date9`,`u_date10`) VALUES ('fafdc5bbf6db48b2827e5b7656789d96 ','13197753b54646a59e313592483aa450 ',NULL,'硕大的','萨达','111111111111111 ','156 ','110000','900','110100 ','A ','13231222234','111111111111111','111111 ','hhhhhhhhhhhhhhhhhhhh ','Tulips201607061545531467791153070.jpg','111111111111111','Tulips201607061545501467791150818.jpg','','',NULL,NULL,NULL,'对方过后就','111111111111111','111111111111111.00','156 ','1 ','','',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'t','2016-07-06 15:46:01.000000','admin110','2016-07-06 15:46:01.000000',NULL,'0 ',NULL,'97',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
之后我拿该sql语句直接到mysql目标库中执行,发现可以执行成功,但是replicat就卡在这无法启动,哪位大神碰到过这个问题? 给出手动插入的 全部操作过程 直接粘贴该sql语句到数据库中执行:
mysql> use ctpsp
mysql> INSERT INTO `ctpsp`.`ss_operating_info` (`id`,`userID`,`creditCode`,`deptName`,`artificialPerson`,`artificialPersonID`,`countryRegion`,`province`,`unitNature`,`areaCode`,`industryCode`,`contactNumber`,`contactAddress`,`zipCode`,`deptCode`,`orgAttachCode`,`licNumber`,`licAttachCode`,`taxNumber`,`taxAttchCode`,`SpoAttachCode`,`comRegNo`,`comRegNoCode`,`openingBank`,`basicAccount`,`regCapital`,`regCapCurrency`,`regUnit`,`infoReporter`,`infoReporterPhone`,`mainTypes`,`version`,`platformName`,`platformCode`,`platfVerifier`,`platfVerifierTime`,`basicInfoState`,`idAttachCode`,`whetherObtaining`,`u_creatTime`,`u_creatUser`,`u_updateTime`,`u_updateUser`,`u_deleteState`,`u_version`,`u_char1`,`u_char2`,`u_char3`,`u_char4`,`u_char5`,`u_char6`,`u_char7`,`u_date8`,`u_date9`,`u_date10`) VALUES ('fafdc5bbf6db48b2827e5b7656789d96 ','13197753b54646a59e313592483aa450 ',NULL,'硕大的','萨达','111111111111111 ','156 ','110000','900','110100 ','A ','13231222234','111111111111111','111111 ','hhhhhhhhhhhhhhhhhhhh ','Tulips201607061545531467791153070.jpg','111111111111111','Tulips201607061545501467791150818.jpg','','',NULL,NULL,NULL,'对方过后就','111111111111111','111111111111111.00','156 ','1 ','','',NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'t','2016-07-06 15:46:01.000000','admin110','2016-07-06 15:46:01.000000',NULL,'0 ',NULL,'97',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
Query OK, 1 row affected (0.01 sec)
mysql> delete from `ctpsp`.`ss_operating_info` where id='fafdc5bbf6db48b2827e5b7656789d96';
Query OK, 1 row affected (0.00 sec) deptCode 'hhhhhhhhhhhhhhhhhhhh ',
可能是你获得的 SHOWSYNTAX 存在变形
desc `ctpsp`.`ss_operating_info` 我从logdump中看到的这条记录的deptCode内容也是这个 'hhhhhhhhhhhhhhhhhhhh '
mysql> desc ctpsp.ss_operating_info;
+--------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+--------------+------+-----+---------+-------+
| id | char(32) | NO | PRI | NULL | |
| userID | char(32) | YES | | NULL | |
| creditCode | char(18) | YES | | NULL | |
| deptName | varchar(100) | YES | | NULL | |
| artificialPerson | varchar(100) | YES | | NULL | |
| artificialPersonID | char(18) | YES | | NULL | |
| countryRegion | char(6) | YES | | NULL | |
| province | varchar(20) | YES | | NULL | |
| unitNature | varchar(20) | YES | | NULL | |
| areaCode | char(6) | YES | | NULL | |
| industryCode | char(6) | YES | | NULL | |
| contactNumber | varchar(100) | YES | | NULL | |
| contactAddress | varchar(500) | YES | | NULL | |
| zipCode | char(6) | YES | | NULL | |
| deptCode | char(20) | YES | | NULL | |
| orgAttachCode | varchar(50) | YES | | NULL | |
| licNumber | varchar(50) | YES | | NULL | |
| licAttachCode | varchar(50) | YES | | NULL | |
| taxNumber | varchar(50) | YES | | NULL | |
| taxAttchCode | varchar(50) | YES | | NULL | |
| SpoAttachCode | varchar(50) | YES | | NULL | |
| comRegNo | varchar(50) | YES | | NULL | |
| comRegNoCode | varchar(50) | YES | | NULL | |
| openingBank | varchar(100) | YES | | NULL | |
| basicAccount | varchar(50) | YES | | NULL | |
| regCapital | varchar(20) | YES | | NULL | |
| regCapCurrency | char(3) | YES | | NULL | |
| regUnit | char(3) | YES | | NULL | |
| infoReporter | varchar(100) | YES | | NULL | |
| infoReporterPhone | varchar(100) | YES | | NULL | |
| mainTypes | int(11) | YES | | NULL | |
| version | char(20) | YES | | NULL | |
| platformName | varchar(100) | YES | | NULL | |
| platformCode | char(11) | YES | | NULL | |
| platfVerifier | varchar(100) | YES | | NULL | |
| platfVerifierTime | datetime | YES | | NULL | |
| basicInfoState | int(11) | YES | | NULL | |
| idAttachCode | varchar(50) | YES | | NULL | |
| whetherObtaining | varchar(2) | YES | | NULL | |
| u_creatTime | datetime | YES | | NULL | |
| u_creatUser | varchar(50) | YES | | NULL | |
| u_updateTime | datetime | YES | | NULL | |
| u_updateUser | varchar(50) | YES | | NULL | |
| u_deleteState | char(1) | YES | | NULL | |
| u_version | char(50) | YES | | NULL | |
| u_char1 | varchar(50) | YES | | NULL | |
| u_char2 | varchar(50) | YES | | NULL | |
| u_char3 | varchar(50) | YES | | NULL | |
| u_char4 | varchar(50) | YES | | NULL | |
| u_char5 | varchar(50) | YES | | NULL | |
| u_char6 | char(50) | YES | | NULL | |
| u_char7 | varchar(50) | YES | | NULL | |
| u_date8 | datetime | YES | | NULL | |
| u_date9 | datetime | YES | | NULL | |
| u_date10 | datetime | YES | | NULL | |
+--------------------+--------------+------+-----+---------+-------+
55 rows in set (0.00 sec) 还有个问题是 我这一列的列长只有20 但是logdump和showsyntax看到的都是'hhhhhhhhhhhhhhhhhhhh ' 这个是超过了20这个长度的 之后我也尝试了下改大deptCode的列长 改成了char(100) 但是启动replicat仍然报这个错误 | deptCode | char(20) | YES | | NULL | |
扩到 40 试试 尝试了目标端扩展到100 还是不行 badly9 发表于 2016-7-7 17:11 static/image/common/back.gif
尝试了目标端扩展到100 还是不行
你好,请问解决了吗?
页:
[1]