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 to [Release 11.2 to 12.1]
Generic Windows
IBM AIX on POWER Systems (64-bit)


Inserting a row with timestamp from with ODP.NET 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)


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


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