Oracle XE and ODBC Gateway will not return rows from remote Sybase
OS: Red Hat Linux 5.8 64-bit
DB: Oracle XE 11gR1 64-bit
Gateway: Oracle Gateway for ODBC 64-bit
Database and gateway reside on same Linux Server.
Connecting to remote Sybase Anywhere 10 server on WindowsXP.
Using FreeTDS odbc driver and unixODBC driver manager.
tsql and isql tools connect w/o issues.
Using 2 LISTENERs started from Oracle XE $ORACLE_HOME listener.ora file.
Noticed dg4odbc was available for use with Oracle XE installation -- that is the dg4odbc that I am using.
===================================
Via SQL*Plus, the following error occurs....
SQL> select * from mytable@dblink;
select * from mytable@dblink
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from DBLINK
===================================
sqlnet.ora
# sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/xe/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH=(TNSNAMES)
ADR_BASE = /u01/app/oracle/product/11.2.0/xe
==================================
tnsnames.ora
# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = reveal01)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
dblink =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)(HOST = mysystem)(PORT = 1522)
)
(CONNECT_DATA =
(SID = dblink))
(HS=OK))
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
=======================
listener.ora
# listener.ora Network Configuration File:
SID_LIST_LISTENER_GTW =
(SID_LIST =
(SID_DESC =
(SID_NAME = dblink)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = dg4odbc)
(ENVS=LD_LIBRARY_PATH=/usr/local/lib/libtdsodbc.so:/u01/app/oracle/product/11.2.0/xe/lib)
)
)
LISTENER_GTW =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = mysystem) (PORT = 1522))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST =mysystem)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
~
~
========================
initdblink.ora
HS_FDS_CONNECT_INFO=dblink
HS_FDS_SHAREABLE_NAME=/etc/unixODBC-2.3.1/DriverManager/.libs/libodbc.so
#HS_FDS_TRACE_LEVEL=255
HS_LANGUAGE=american_america.we8iso8859p1
HS_NLS_NCHAR=UCS2
#
# ODBC specific environment variables
#
set ODBCINI=/etc/odbc.ini
========================
HS trace file
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
HOSGIP returned value of "UCS2" for HS_NLS_NCHAR
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "dblink"
Product-Info:
Port Rls/Upd:2/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.2.0_0008, Instance:dblink
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=31
HOCXU_DRV_NCHAR=1000
HOCXU_DB_CSET=873
HS_LANGUAGE is american_america.we8iso8859p1
LANG=en_US.UTF-8
HOCXU_SEM_VER=112000
Entered hgolofn at 2012/10/01-16:49:50
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/etc/unixODBC-2.3.1/DriverManager/.libs/libodbc.so"
Entered hgolofns at 2012/10/01-16:49:50
hoaerr:28500
Exiting hgolofns at 2012/10/01-16:49:50
Failed to load ODBC library symbol: /etc/unixODBC-2.3.1/DriverManager/.libs/libodbc.so(SQLAllocHandle)
Exiting hgolofn, rc=28500 at 2012/10/01-16:49:50
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:417 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:110 FUNCTION:hgoexit() ID:Connection context
===============================
Appears to be an issue with the unixODBC driver manager on Linux. As mentioned earlier, tsql and isql work fine.
Any help will be greatly appreciated.
Thank you.
Edited by: user601798 on Oct 1, 2012 2:52 PM
Edited by: user601798 on Oct 1, 2012 2:53 PM