创建DBLINK Oracle到SQL Server的错误

问题描述

我正在创建DBLINK Oracle(11gR2)(Windows Server 2008)到SQL Server(Windows 10)。

我已经安装了Oracle Gateway。

我在ODBC数据源管理器中创建了一种数据字体,连接正常。他叫Integra。

我更改了文件listener.ora,tnsnames.ora,sqlnet.ora和initIntegra.ora。

遵循我的设置:

服务器Oracle无IP:192.168.1.22

服务器SQLServer否IP:192.168.1.18

Listener.ora

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

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = Serverlab3)(PORT = 1521))
    )
  )
ADR_BASE_LISTENER = D:\app

tnsnames.ora

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

initIntegra.ora

# 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= Integra
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>

sqlnet.ora

# This file is actually generated by netca. But if customers choose to 
# install "Software Only",this file wont exist and without the native 
# authentication,they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT)

创建DBLINK

CREATE DATABASE LINK INTEGRA CONNECT TO "sa" IDENTIFIED BY "senha" USING 'Integra';

select * from tabela@INTEGRA;

SQL错误[28546] [99999]:ORA-28546:连接初始化失败,可能是Net8管理员错误。 ORA-02063:INTEGRA的前一行 *

注意:我在ODBC管理器中的数据源名称为Integra。并且ODBC Windows管理员进行的连接测试非常有效。

一个问题: 在TNSNAMES中,主机必须是LOCALHOST和端口1521吗?

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)