OGG Replicat Abends with ORA-01841: (full) Year Must be Between -4713 and +9999, and not be 0 (Doc ID 1411303.1)

Last updated on AUGUST 01, 2016

Applies to:

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

Symptoms

Oracle GoldenGate (OGG) Replicat abends with following error

WARNING OGG-01154 SQL error 1841 mapping HR.STAFF_CERTIFIC
ATE to HR.STAFF_CERTIFICATE OCI Error ORA-01841: (full) year must be between -47
13 and +9999, and not be 0 (status = 1841), SQL <UPDATE "HR"."STAFF_CERTIFICATE"RTIFICATE_TYPE" = :b0 AND "EMPLOYEE_NO" = :b1 AND "RELEASE_DATE" = :b2>.

 

The issue happens with invalid year . Eg a year value of 0000

The error can be reproduced as following


insert into STAFF_CERTIFICATE values ('CN', 'a', 'b', 'c', 'd', sysdate, sysdate, 1, 'e', sysdate);
update STAFF_CERTIFICATE set employee_no='1020209371';
update STAFF_CERTIFICATE d
set d.release_date= to_date('0001-01-01', 'yyyy-mm-dd')-365
where d.employee_no='1020209371' and d.certificate_type='CN'

Cause

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