My Oracle Support Banner

Db2 to Oracle - Replicat failed - ORA-01400: cannot insert NULL (Doc ID 2856912.1)

Last updated on JULY 18, 2023

Applies to:

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

Symptoms

Replication from Db2 to Oracle.
The Oracle replicat failed with

--
2022-02-25 12:39:39 WARNING OGG-01154 SQL error 1400 mapping
<schema>.<Tablename> to <schema>.<Tablename> OCI Error
ORA-01400: cannot insert NULL into
(<schema>.<Tablename>."<COLUMN_XX ") (status = 1400), SQL
--
--

2022-02-25 12:39:39 ERROR OGG-01296 Error mapping from
<schema>.<Tablename> to <schema>.<Tablename>.
--
the discard shows

OCI Error ORA-01400: cannot insert NULL into
("<schema>"."<Tablename>"."ETL_PRCS_STAT_CD") (status = 1400), SQL
---

The trail file shows the record on the specified column as not null. But the
replicat takes it as null.

From Db2 source the column is (col 13 in logdump and actual column 14)
"COLUMN_XX " SMALLINT NOT NULL

Logdump 2040 >pos 3773
Reading forward from RBA 3773
Logdump 2041 >n
___________________________________________________________________
Hdr-Ind : E (x45) Partition : . (x0c)
UndoFlag : . (x00) BeforeAfter: A (x41)
RecLength : 545 (x0221) IO Time : 2022/02/25 12:30:23.000.000
IOType : 5 (x05) OrigNode : 255 (xff)
TransInd : . (x03) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 0 AuditPos : 2318284519738
Continued : N (x00) RecCount : 1 (x01)

2022/02/25 12:30:23.000.000 Insert Len 545 RBA 3773
Name: <schema>.<Tablename> (TDR Index: 1)
After Image: Partition x0c G
--

Column 13 (x000d), Len 10 (x000a)
0000 0000 0000 0000 0000 |
.......... ===============================>probelmatic column

So here the column 13 is not null.The first number is null indicator in logdump and it will show as ffff if it is null.

from target Oracle, the column is
COLUMN_XX NUMBER NOT NULL

 

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.