OCI Application Fails With ORA-01483/ORA-01461 When Inserting VARCHAR2 Field From 12.2 Database Using Database Link To Lower Database Version.

(Doc ID 2309285.1)

Last updated on SEPTEMBER 28, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Information in this document applies to any platform.
*** Checked for relevance on 26th Sep 2017 ***

Symptoms

An OCI application connected to a 12.2.0.x database fails with any of the below error when inserting a VARCHAR2 column through a database link pointing to a lower database version.
This error happens only when:

1) The VARCHAR2 bind is followed by a NUMBER bind or another VARCHAR2 bind.
2) The OCI environment is initialized in OCI_UTF16ID mode.
3) The length of the bind value is > 2k.

For example, consider a table with below structure:

 

Changes

Upgraded the database to 12.2.0.1.0 or its a new application. 

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