如何解决使用异构服务从Oracle连接到SQL Server的问题

时间:2019-02-04 00:56:55

标签: sql-server oracle database-administration

我在单独的计算机上安装了Oracle 11g和SQLServer 2017.我想要从Oracle到sql server的链接,我设置了正确的odbc驱动程序tnsnames和listiner,我可以ping sid,并且驱动程序可以进行连接测试。

odbc驱动程序

window.open('http://linktosinglepost.com', '_system');

tnsnames#:

HS_FDS_CONNECT_INFO = SQLSERVER1

HS_FDS_TRACE_LEVEL = OFF

侦听器#:

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)
   )
)

SQLSERVER1 =
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-DJRR6FK)(PORT = 1521))
    (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = SQLSERVER1)
   )
    (HS=OK)
  )



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

也是我创建的数据库链接。

但何时

    SID_LIST_LISTENER =




(SID_DESC =
        (SID_NAME = SQLSERVER1)
     (ORACLE_HOME = C:\app\JAB\product\11.2.0\dbhome_1)
      (PROGRAM = dg4odbc)


)

)

LISTENER =
  (DESCRIPTION_LIST =
   (DESCRIPTION =
     (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
     (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
   )
 )

由Net8诊断出的我走错误

我希望输出数据集,但实际输出是:

  

ORA-28545:连接到代理时由Net8诊断的错误无法   检索NETWORK / NCR消息65535 ORA-02063的文本:前2个   来自EXCEL_EMPLOYEE_DBLINK的行   28545。0000-“连接到代理时由Net8诊断错误”   *原因:尝试调用外部过程或发出SQL              异构服务数据库链接上连接到非Oracle系统              连接初始化失败。错误诊断              由Net8 NCR软件单独报告。   *操作:请参阅Net8 NCRO错误消息。如果不清楚              在tnsnames.ora中检查连接管理设置              和listener.ora以获取与              正在使用或与异构服务数据库链接一起使用              “ extproc_connection_data”用于外部过程调用。

0 个答案:

没有答案