I am trying to access SQL Server table from Oracle. I have installed Microsoft ODBC Driver 17 for SQL Server for RED HAT 7. Oracle connects to ODBC via Heterogeneous Services and I have created a database link.
When I select using the link it is able to fetches most data. It however fails while fetching the varbinay(max) columns with the following error message:
ERROR: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation
{01004}[Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation
{01004}[Microsoft][ODBC Driver 17 for SQL Server]String data, right truncation
ORA-02063: preceding 2 lines from MSSQLDB
It works fine if I omit the varbinary(max) column or with varbinary(200) etc . Any advise is greatly welcome.
My hs config init file looks like below
HS_FDS_CONNECT_INFO = DSN_NAME
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P15
HS_FDS_PROC_IS_FUNC = TRUE
HS_FDS_RESULTSET_SUPPORT = TRUE
set LD_LIBRARY_PATH=/opt/microsoft/msodbcsql17/lib64:/usr/lib64:/u01/app/oracle/product/12.2.0
The same was repeated with SQL Server Native Client (Version 1) and it still fails with the same error.
Regards
Murali