Oracle 11g gateways(透明网关)配置

时间:2022-08-03 05:00:31

配置要点主要有三点

1、%GATEWAYS_HOME%(透明网关安装目录)\dg4msql\admin\initdg4msql.ora

内容:

HS_FDS_CONNECT_INFO=localhost//DATABASENAME
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER

要注意的是HS_FDS_CONNECT_INFO,这里配置的是gateways连接SQL SERVER数据库的参数,含4个部分

1 服务器地址;2 端口;3 实例名;4 数据库名

经本人测试1、4是必需要的,2、3没有的情况下也可以。

猜测:1433端口可省略(未验证过)

奇怪经历:使用 localhost/MSSQLSERVER/Northwind 配置失败,不知原因,有知道的朋友请指正一下

完整配置是这样:localhost:1433/MSSQLSERVER/Northwind

2、%GATEWAYS_HOME%(透明网关安装目录)\NETWORK\admin\listener.ora

内容:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = dg4msql)
(ORACLE_HOME = C:\oracle\gateways)
(PROGRAM = dg4msql)
)
) LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = WIN-VV5TMJBQ3LN)(PORT = ))
)
) ADR_BASE_LISTENER = C:\oracle\gateways

这里面的配置了解得不是很清楚,红色部分是添加进来的与要点1对应。

3、重启服务