[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
Hi,
I have installed ODBC driver to connect to MS SQL databas (2008) from oracle database 11gr1 on linux 64-bit. I have downloaded and installed
as per the instructions on microsoft website:
microsoft.com/en-us/download/details.aspx?id=28160
Afte this i have configured the DG4ODBC following note ID 561033.1. Below are the details of the files i have edited to configure.
Listener.ora:
---------------
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME=DG4ODBC)
(ORACLE_HOME=/u01/oracle/fakieh/db/tech_st/11.1.0)
(ENV="LD_LIBRARY_PATH=/usr/lib64:/u01/oracle/fakieh/db/tech_st/11.1.0/lib")
(PROGRAM=dg4odbc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = testdb.domain.com ) (PORT = 1511))
)
)
)
tnsnames.ora:
-------------
DG4ODBC=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST= testdb.domain.com )(PORT=1511))
(CONNECT_DATA=(SID=DG4ODBC))
(HS=OK)
)
initDG4ODBC.ora ($ORACLE_HOME/hs/admin)
--------------------------------------
# HS init parameters
#
HS_FDS_CONNECT_INFO = mssql
HS_FDS_TRACE_LEVEL = off
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so
#
# ODBC specific environment variables
#
set ODBCINI=/home/oracle/odbc.ini
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>
odbc.ini
--------
[ODBC Data Sources]
mssql=MS SQL Server
[mssql]
Driver=/usr/lib64/libodbc.so
Database=FAKIH_ToTestInt
LogonID=user
Password=passwd
Address=SJSQLV01.domain.com
QuotedId=YES
AnsiNPW=YES
HS_FDS_SUPPORT_STATISTICS=FALSE
[ODBC]
IANAAppCodePage=4
Trace=0
UseCursorLib=0
UseCursorLib=0
Tnsping is successful, but when i try to connect the remote db it give me below message.
SQL> select * from "systables"@mssqltest;
select * from "systables"@mssqltest
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
ORA-02063: preceding 2 lines from MSSQLTEST
please suggest how to resolve this.