ORA-28500 Or ORA-972 When a Non-Oracle Database Column Name Has More Than 30 Characters (Doc ID 1433102.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]
Oracle Database Gateway for SQL Server - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]
Oracle Database Gateway for Sybase - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]
Oracle Database Gateway for Informix - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]
Oracle Database Gateway for Teradata - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]
Information in this document applies to any platform.
***Checked for relevance on 12-May-2014***

Symptoms

You have a remote table with column name with more than 30 characters.
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 TESTING_THIRTY_CHARACTERS_DG4GTW                     CHAR(10)

When selecting data from a remote table having more than 30 characters in the column name using a Database Gateway, the following error is given:
(in this example, remote table is from SQL SERVER)

SQL> select * from "table_with_long_column"@dg112msql;
select * from "table_with_long_column"@dg112msql
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Native Wire Protocol driver][Microsoft SQL
Server]Invalid column name 'TESTING_THIRTY_CHARACTERS_DG4G'. {42S22,NativeErr =
207}[Oracle][ODBC SQL Server Native Wire Protocol driver][Microsoft SQL
Server]Statement(s) could not be prepared. {HY000,NativeErr = 8180}
ORA-02063: preceding 2 lines from DG112MSQL

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