Database Link to iSeries AS400 Libraries
I have Oracle Version 10.2.0.1.0 on Centos (Linux version 2.6.9-42.0.2.ELsmp (buildsvn@build-i386) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3))) . I configured unixODBC (2.2.11) and odbc driver for AS400 (iSeriesAccess 5.2.0.1-12). isql works just fine i can retrieve data from as400 in linux. Than I configured oracle listener, tnsnames and init files and receive problems when I create link and try to connect thru this link:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of Network/NCR message 65535
ORA-02063: preceding 2 lines from DBLINK_DATALIB
I found in listener log message:
01-OCT-2006 20:07:29 * ping * 0
01-OCT-2006 20:07:46 * ping * 0
01-OCT-2006 20:08:17 * (CONNECT_DATA=(SID=dtlb)(CID=(PROGRAM=)(HOST=host1002)(USER=asa.basa))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=34908)) * establish * dtlb * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
TNS-12560: TNS:protocol adapter error
TNS-00517: Lost contact
Linux Error: 32: Broken pipe
tnsping works fine, i use separate listener, but where I try to retrieve data i receive this error. My listener.log has only few megs. I tried to set up DIRECT_HANDOFF_TTC_LSNRAS400 to on or off. Also checked for max opened files in linux and so on, but everything looks fine. See files my configuration below:
initas400.ora:
# This is a sample agent init file that contains the HS parameters that are
# needed for an ODBC Agent.
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = as400
HS_FDS_TRACE_LEVEL = 1
HS_FDS_SHAREABLE_NAME = /usr/local/lib/libodbc.so
#
# ODBC specific environment variables
#
set ODBCINI=/usr/local/etc/odbc.ini
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>
initdtlb.ora:
# This is a sample agent init file that contains the HS parameters that are
# needed for an ODBC Agent.
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = dtlb
HS_FDS_TRACE_LEVEL = 1
HS_FDS_SHAREABLE_NAME = /usr/local/lib/libodbc.so
#
# ODBC specific environment variables
#
set ODBCINI=/usr/local/etc/odbc.ini
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>
listener.ora:
# listener.ora Network Configuration File: /oracle/10g/network/admin/listener.ora
# Generated by Oracle configuration tools.
#DIRECT_HANDOFF_TTC_LSNRAS400=ON
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/10g)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = centoslinux.dmn.com)(PORT = 1522))
)
)
SID_LIST_LSNRAS400 =
(SID_LIST =
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = as400)
(ORACLE_HOME = /oracle/10g)
(ENVS=LD_LIBRARY_PATH = /usr/local/lib:/usr/lib:/oracle/10g/lib:/oracle/10g/hs/lib)
)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = dtlb)
(ORACLE_HOME = /oracle/10g)
(ENVS=LD_LIBRARY_PATH = /usr/local/lib:/usr/lib:/oracle/10g/lib:/oracle/10g/hs/lib)
)
)
LSNRAS400 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = centoslinux.dmn.com)(PORT = 1523))
)
)
tnsnames.ora:
# tnsnames.ora Network Configuration File: /oracle/10g/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = centoslinux.dmn.com)(PORT = 1522))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = centoslinux.dmn.com)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
as400 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = centoslinux.dmn.com)(PORT = 1523))
(CONNECT_DATA =
(SID = as400)
)
(HS=OK)
)
dtlb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = centoslinux.dmn.com)(PORT = 1523))
(CONNECT_DATA =
(SID = dtlb)
)
(HS=OK)
)
It's pretty stupid but I have no idea what else I can try to get it work. On oracle under windows xp these links works fine, why not under centos? Thanks for any advices !