目前想从 Oracle 连接到 SQL server ,
通过透明网关实现
已完成工作: 安装Oracle 服务端、客户端、Oracle网关、SQL Server
配置好: listener、tns、initdg4msql
Listener 配置
# listener.ora Network Configuration File: E:\app\Administrator\product\11.2.0\client_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
LIS =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-P9B743K118T)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=dg4msql)
(ORACLE_HOME=E:\app\Administrator\product\11.2.0\client_1)
(PROGRAM=dg4msql)
)
)
ADR_BASE_LIS = E:\app\Administrator
TNS 脚本:
# tnsnames.ora Network Configuration File: E:\app\Administrator\product\11.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.102)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DR_VIEW)
)
)
DR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.102)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DR_VIEW)
)
)
DG4MSQL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp)(HOST =192.168.0.113)(PORT = 1521))
)
(CONNECT_DATA =
(SID = dg4msql)
)
(HS = OK)
)
# This is a customized agent init file that contains the HS parameters
# that are needed for the Database Gateway for Microsoft SQL Server
#
# HS init parameters
#
HS_FDS_CONNECT_INFO=192.168.0.113//LANDA
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
创建 database link 脚本:
CREATE DATABASE LINK LANDA_TEST
CONNECT TO sa IDENTIFIED BY bean
USING 'DG4MSQL'
------解决方案--------------------