Error Sqlstate HY004 Using DG4ODBC to Connect to Non-Oracle Databases

(Doc ID 1914663.1)

Last updated on JANUARY 19, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.

Symptoms

Using Dg4ODBC 11.2 to select from a non-Oracle database may give errors such as -

SQL> select count(*) from "OWNER"."TABLE_NAME"@"DB2_LINK" where column_name=991;
select count(*) from table_name where column_name=991
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[IBM][CLI Driver] CLI0123E SQL data type out of range. SQLSTATE=HY004
{HY004,NativeErr = -99999}
ORA-02063: preceding 2 lines from DB2_LINK

The actual format of the message will vary depending on the non-Oracle database and ODBC driver being used but there will be an 'HY004' error.

 

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