我正在尝试将Oracle 11G用户连接到SQL server 2012数据库。我已经使用ODBC系统DSN创建了一个数据源。我已经在文件夹$ORACLE_HOME\hs\admin下配置了oracle异构服务,但是当我尝试ping新的侦听器时,它抛出了异常。我的配置如下:
我的initdg4odbc配置:
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = OTOSS
HS_FDS_TRACE_LEVEL = OFF
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>监听程序配置
# This is a sample listener.ora that contains the NET8 parameters that are
# needed to connect to an HS Agent
OTOSS =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_OTOSS=
(SID_LIST=
(SID_DESC=
(SID_NAME=OTOSS)
(ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_2)
(PROGRAM=dg4odbc)
)
)
#CONNECT_TIMEOUT_LISTENER = 0 tnsnames配置
# This is a sample tnsnames.ora that contains the NET8 parameters that are
# needed to connect to an HS Agent
OTOSS =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1522))
(CONNECT_DATA=(SID=OTOSS))
(HS=OK)
)我哪里做错了?
发布于 2016-11-05 23:26:24
这是一个老生常谈的问题,但也许它会有所帮助。尝试将initdg4odbc.ora名称更改为initOTOSS.ora,确保系统DSN的名称为OTOSS,并且系统DSN与所需的体系结构(32位或64位)相对应。然后,如果使用的是Windows系统,请重新启动,它应该可以正常工作。有关更多详细信息,请使用此问题中的配置:Connect MS SQL to Oracle Database
https://stackoverflow.com/questions/36735641
复制相似问题