Inserting Row With Timestamp From ODP.NET Using Oracle BulkCopy Class Results in an Invalid Year and Fractional Seconds Being Stored in an AIX DB (Big Endian) (Doc ID 1614751.1)

Last updated on JANUARY 17, 2014

Applies to:

Oracle Data Provider for .NET - Version 11.2.0.4 to 12.1.0.1 [Release 11.2 to 12.1]
Generic Windows
IBM AIX on POWER Systems (64-bit)

Symptoms

Inserting a row with timestamp from with ODP.NET 11.2.0.4.0 or later using the OracleBulkCopy Class (Direct Path API) causes invalid year and fractional seconds to be stored when the client is Little Endian and the server is Big Endian. (AIX DB).

This is only reproducible with a database on AIX or a any platform where the byte ordering is Big Endian.

Sample Test Case:


Database Table creation script:

 
Sample Output:

SQL> desc test_table;
Name                                      Null?    Type
----------------------------------------- -------- ----------------------------
COLUMNA                                   NOT NULL VARCHAR2(38 CHAR)
COLUMNB                                   NOT NULL TIMESTAMP(4)
COLUMNC                                   NOT NULL NUMBER(19)


SQL>  alter session set NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH:MI:SS.FF';

Session altered.

SQL> set linesize 500
SQL> select * from test_table;

COLUMNA                                COLUMNB                                                                COLUMNC
-------------------------------------- --------------------------------------------------------------------------- ----------
Test                                   8953-11-12 09:45:27.2123    <- Invalid timestamp                1

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