Replicat Abends With OGG-01163 On NUMBER(20,0) Datatype Column.

(Doc ID 2267262.1)

Last updated on JULY 24, 2017

Applies to:

Oracle GoldenGate - Version 12.1.2.1.0 and later
Information in this document applies to any platform.

Goal

Source: DB2 i
Target: Oracle
OGG was 12.1 at source and target:  Version 12.1.2.1.7 21031614 OGGCORE_12.1.2.1.0OGGBP_PLATFORMS_150520.1612_FBO

Insert was failing on a column with datatype DECIMAL. This was failing on target as DB2 i also.

Table definitions were same....Source- TBL1   Target- TBL2

TABLE_NAME COLUMN_NAME TABLE_OWNER ORDINAL_POSITION DATA_TYPE LENGTH NUMERIC_SCALE IS_NULLABLE
---------- ----------- ----------- ---------------- --------- ------ ------------- -----------
TBL1 ID1 GGSUPP01 1 DECIMAL 20 0 Y
TBL1 ID2 GGSUPP01 2 NUMERIC 20 0 Y

TBL2 ID GGSUPP01 1 DECIMAL 20 0 Y
TBL2 ID2 GGSUPP01 2 NUMERIC 20 0 Y

 



INSERT INTO artest.tbl1
VALUES(88888888888888888888.0,99999999999999999999.0);
.
3. The above insert fails replicating when ASSUMETARGETDEFS is used:
Source Context :
SourceModule : [ggstd.conv.endian]
SourceID :
[/QOpenSys/home/oggbuild/OGGCORE_12.1.2.0.T2_PLATFORMS_140118.2244/oggcore/Ope
nSys/src/gglib/ggstd/lecnv.c]
SourceFunction : [convCompSQL(char *, file_def *, rowlen_t, bool)]
SourceLine : [627]
.
2016-11-02 15:09:09 ERROR OGG-01163 Bad column length (22) specified for
column ID in table ARTEST.TBL1, maximum allowable length is 21.
.

 

 

Replication worked with following workaround in OGG 12.1 by changing the length of the column in defgen:

==> But when the DEFGEN is modified from all 21s to all 22s as below the replication works:

ORIGINAL DEFGEN:
*+- Defgen version 4.0, Encoding ISO-8859-1
Database type: DB2400
Character set ID: UTF-8
National character set ID: UTF-16
Locale: en_US_POSIX
Case sensitivity: 14 14 14 14 14 14 14 14 14 14 14 14 11 14 14 14
TimeZone: US/Mountain
*
Definition for table ARTEST.TBL1
Record length: 31
Syskey: 0
Columns: 2
ID1 64 21 0 0 0 1 0 21 21 11 0 0 0 0 1 0 1 3 3 -1
ID2 64 21 11 0 0 1 0 21 21 20 0 0 0 0 1 0 1 3 2 -1
End of definition
.
.
MODIFIED DEFGEN
Definition for table ARTEST.TBL1
Record length: 31
Syskey: 0
Columns: 2
ID1 64 22 0 0 0 1 0 22 22 11 0 0 0 0 1 0 1 3 3 -1
ID2 64 22 11 0 0 1 0 22 22 20 0 0 0 0 1 0 1 3 2 -1
End of definition

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms