a
在Oracle服务端安装MSSQL透明网关。
修改%ORACLE_HOME%tg4msqlinittg4msql.ora
HS_FDS_CONNECT_INFO="SERVER=172.16.47.97;DATABASE=master"
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
修改%ORACLE_HOME%networkadminlistener.ora如下:
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=tg4msql)
(ORACLE_HOME=e:OracleOraHome_9I) #用你的%ORACLE_HOME%
(PROGRAM=tg4msql)
)
)
修改tnsnames.ora
sqlsv = #你可以选用其它
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST= GATEWAY)
(PORT = 1521)
)
(CONNECT_DATA =
(SID = tg4msql) #tg4msql必须要和GATEWAY上listener.ora中的SID一致
)
(HS = OK) #这很重要,告诉Oracle Server要调用异构服务模块来处理
)
创建访问SQLDB的数据库链接
CREATE database link DL_SQLSV using 'sqlsv'
--CREATE PUBLIC database link DL_SQLSV using 'sqlsv'
OK!最后执行SQL测试看是否能正常访问SQL Server
select * from all_users@dl_sqlsv;
阅读(735) | 评论(0) | 转发(0) |