OGG启动REPLICAT进程又遇到OGG-00212错误
May172013
今天在给客户安装OGG的时候,REPLICAT进程无法启动。
GGSCI (ycods1) 24> start REPCIMXB Sending START request to MANAGER ... REPLICAT REPCIMXB starting GGSCI (ycods1) 25> info all Program Status Group Lag Time Since Chkpt MANAGER RUNNING REPLICAT ABENDED REPCIMXB 00:00:00 00:09:08 REPLICAT RUNNING TREPLVA 00:00:00 00:00:05
观察日志,发现又是OGG-00212错误。
2013-05-08 11:43:30 ERROR OGG-00212 Invalid option for MAP: SG_CIM.MATCONPERFRECEVIEDINFO.
经过分析发现MATCONPERFRECEVIEDINFO表在MAP的时候出现问题,而源端和目标端表结构、字符集什么的都一致,配置文件是客户总部下发,按理说经过严格测试不会存在问题,仔细观察配置文件。
MAP CIM.MATCONTRACT ,TARGET SG_CIM.MATCONTRACT , COLMAP ( USEDEFAULTS, UPDATETIME=@DATENOW()); MAP CIM.MATCONPERFRECEVIEDINFO,TARGET SG_CIM.MATCONPERFRECEVIEDINFO , COLMAP ( USEDEFAULTS, UPDATETIME=@DATENOW()); MAP CIM.MATCONPERFPAYMENT ,TARGET SG_CIM.MATCONPERFPAYMENT , COLMAP ( USEDEFAULTS, UPDATETIME=@DATENOW()); MAP CIM.MATSUPPLIERINFO ,TARGET SG_CIM.MATSUPPLIERINFO , COLMAP ( USEDEFAULTS, UPDATETIME=@DATENOW());
发现MATCONPERFRECEVIEDINFO表(标红部分的逗号前面少了一个空格),只有这行在表名后面没有空格,其他行表名后面都有空格,猜测是因为少个空格导致的,加上空格,再次启动。
GGSCI (ycods1) 38> start REPCIMXB Sending START request to MANAGER ... REPLICAT REPCIMXB starting GGSCI (ycods1) 39> info all Program Status Group Lag Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING REPCIMXB 00:00:00 00:00:01 REPLICAT RUNNING TREPLVA 00:00:00 00:00:03
而且,REPLICAT进程复制正常。
Start of Statistics at 2013-05-08 11:50:44. Replicating from CIM.MATCONPERFRECEVIEDINFO to SG_CIM.MATCONPERFRECEVIEDINFO: *** Total statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Daily statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Hourly statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Latest statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 Replicating from CIM.MATCONPERFPAYMENT to SG_CIM.MATCONPERFPAYMENT: *** Total statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Daily statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Hourly statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Latest statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 Replicating from CIM.MATSUPPLIERINFO to SG_CIM.MATSUPPLIERINFO: *** Total statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Daily statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Hourly statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 *** Latest statistics since 2013-05-08 11:50:29 *** Total inserts 1.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 1.00 End of Statistics.
这个问题很有意思,正常没有这个空格也是可以的,通过这个案例也可以说明,表名后面要是所有行都不加空格直接加逗号,是没有问题的,要是都加个空格也是可以的,但只要有一个没加就可能遇到问题,也就是要加就全家,不加就都不加,恶心啊。