将Oracle 11g连接到SQL Server 2012的问题 - ORA-12523:TNS:侦听器找不到适合客户端连接的实例

时间:2017-04-22 11:00:23

标签: sql-server oracle oracle11g sql-server-2012

我在同一个虚拟机上安装了Oracle 11g和SQL Server 2012。操作系统是Windows Server 2012.我想从Oracle访问SQL Server 2012。几天前我创建了这台机器,以便在将其应用到服务器之前测试连接过程。

我遇到过几个问题,但现在我遇到了这个问题。

ORA-12523:TNS:侦听器无法找到适合客户端的实例 连接

我已经使用 sqldb 的名称创建了ODBC Connection。

kshaz 是我的机器名。

以下是我的配置详情。

listener.ora文件

# listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
    (SID_DESC =
      (SID_NAME = sqldb)
      (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = hsodbc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = kshaz)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = C:\app\Administrator

DIRECT_HANDOFF_TTC_LISTENER = OFF

tnsnames.ora文件

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
SQLDB =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
   )
 (CONNECT_DATA =
   (SERVICE_NAME = sqldb)
 )
)

sqlnet.ora文件

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

initsqldb.ora文件

HS_FDS_CONNECT_INFO = sqldb
HS_FDS_TRACE_LEVEL = off

我正在运行以下查询。

select * from emptest@sqld

emptest 是在SQL Server 2012中创建的表, SQLD 是公共数据库链接。

我的配置出了什么问题?或者,如果有任何我错过的步骤?

谢谢。

0 个答案:

没有答案