My Oracle Support Banner

ORA-28500 String data, right truncation {01004} Error Using Database Gateway for ODBC (DG4ODBC) (Doc ID 2519890.1)

Last updated on JUNE 08, 2023

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.2 to 18]
Information in this document applies to any platform.


You are using Oracle Database Gateway for ODBC (DG4ODBC) 18c with the Microsoft ODBC Driver version 17 (with unixODBC) connecting to a MSSQL database.

Some queries are working fine, while others fail this error:

[Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation {01004}

A gateway trace shows the following:

hgopoer, line 240: got native error 0 and sqlstate 01004; message follows...
[Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation {01004}
Exiting hgopoer, rc=0 at 2019/03/19-13:43:10
hgoftch2, line 1074: calling SQLGetData got sqlstate 01004
100 rows fetched
Exiting hgoftch2, rc=28500 at 2019/03/19-13:43:10 with error ptr FILE:hgoftch.c LINE:1074 ID:Row error while doing array fetch


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.