诊断:Goldengate OGG-01163 Bad column length

故障现象:

OGG-01163 Bad column length (27) specified for column MOBILE in table OWNER.TABLE, maximum allowable length is 20.

 

原因:
源端修改了字段长度。
虽然源端和目标端的长度已经通过DDL语句修改到一致,在extract进程未重启的情况下,生成的trail文件中的meta信息并不会更新。
replicat进程默认按照trail文件中的meta信息进行操作。
故会产生错误。


解决:
1、生成def文件,实体是个文本文件

* 
Definition for table OWNER.TABLE
Record length: 1440 
Syskey: 0 
Columns: 12 
... 
MOBILE 64 50 28 0 0 1 0 50 50 0 0 0 0 0 1 0 0 0 1 -1 0 0 0 
... 
End of definition 
*

 

2、将def文件传输到目标端
在replicat中使用

SOURCEDEFS ./dirdef/table.def OVERRIDE
--ASSUMETARGETDEFS

 

其中OVERRIDE必须,这样才能覆盖trail中的meta信息。

OGG-02752 The definition for table OWNER.TABLE from definitions file ./dirdef/table.def overrides the table metadata from the trail.

 

posted @ 2018-05-22 11:17  syksky  阅读(958)  评论(0编辑  收藏  举报