My Oracle Support Banner

GoldenGate Replicat Characterset Conversion: Error 160 Bad column length (Doc ID 1199561.1)

Last updated on FEBRUARY 22, 2019

Applies to:

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


When replicaing from multi-byte source column to single byte target column, the replicat may abend with error:
GGS ERROR 160 Bad column length.

There are four known causes and solutions.

Example 1:

1. source: AL32UTF8
create table s1 (a number, b varchar2(1) CHAR);
insert into s1 values (2,unistr('\00c4'));
insert into s1 values (1,unistr('\2019'));
select a,dump(b,16) from s1;
A DUMP(B,16)
---------- ------------------------------
2 Typ=1 Len=2: c3,84
1 Typ=1 Len=3: e2,80,99

2. target: WE8ISO8859P1
create table r1 (a number, b varchar2(1) CHAR);

AMERICAN_AMERICA.AL32UTF8 is set in both extract and replicat.
Replicat abended with
"2010-08-03 22:27:12 GGS ERROR 160 Bad column length (2) specified
for column B in table GGUSER.S1, maximum allowable length is 1."


Source and target have same characterset.  The problem column was added with a default value after table creation. Database version is or
e.g.,  alter table test_table add test_c4 char(10) default 'A' not null;


Source columns is varchar2(1 byte). The extract record should be 1 byte like:
Column 2 (x0002), Len 5 (x0005)
0000 0001 64 | ....d

Instead, we see 2-byte value in an update trail record, which caused replicat abend:
Column 2 (x0002), Len 6 (x0006)
0000 0002 0164 | .....d



Example 4



2011-11-15 14:26:50  ERROR   OGG-01163  Bad column length (143) specified for 
, maximum allowable length is 25. 
As a work-around alter the target column to VARCHAR2(200 CHAR) from VARCHAR2(25 CHAR)


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.