My Oracle Support Banner

_EMPTYTOSPACENULLABLE parameter to replicat empty string to space for NULLABLE columns (Doc ID 2831205.1)

Last updated on JUNE 26, 2022

Applies to:

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

Symptoms

Having blank spaces in the source db(Mysql) and while replicating them to target (Oracle DB), OGG is
inserting NULL values. The target table column is NULLABLE.
The insert on source is like:
insert into <tablename> ('col1','col2') values ('c18',' ');

where as on target:

select nvl(col2,'this is null') from <tablename>;
this is null

Do not want to have NULLs to be inserted in the column and hence used _EMPTYTOSPACE parameter
which should add space instead of NULL columns. But even with this parameter,the same behavior is been noticed.

It was working fine when using ogg v12.2.x was been used in the source.

The behavior was changed in OGG v19.1 where we send exact data instead of space padded
data for the character columns. So in OGG v12.x, if char length is 5 and
actual data is 2 characters then we used to pad the rest three characters by
space whereas in release 19.x we send exact two characters without padding.
This was done to handle globalization related character conversions.

So when customer did a upgrade in the source (from mysql ogg v12.2.x to mysql
ogg v19.x),customer gets Null in the Oracle target .

Cause

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
Symptoms
Cause
Solution
References


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