透明网关配置_SqlServer
在oracle自定义安装时选择transparent gate(透明网关)
--sql
环境:
oracle:192.168.2.75
sqlserver:192.168.5.122
1、配置inittg4msql.ora
此文件名规则:init<orasid>.ora
路径$ORACLE_HOME\tg4mssql\admin\inittg4mssql.ora
HS_FDS_CONNECT_INFO="SERVER=192.168.5.122;DATABASE=master"
HS_FDS_TRACE_LEVEL=on
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
说明:server最好配置成sqlserver数据库的ip地址
2、在listener.ora中增加tg4msql配置
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = wyh)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\oracle\ora92)
(PROGRAM = extproc)
)
#sql
(SID_DESC =
(GLOBAL_DBNAME = tg4msql)
(PROGRAM = tg4msql)
(SID_NAME = tg4msql)
(ORACLE_HOME = d:\oracle\ora92)
)
)
3、在tnsname.ora中增加配置
oratosql =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.75)(PORT=1521))
(CONNECT_DATA=(SID=tg4msql))
(HS=OK)
)
4、从新启动监听
lsnrctl stop
lsnrctl start
5、建立数据库连接
SQL> create database link oratosql connect to sa identified by sa
2 using 'oratosql';
数据库链接已创建。
6、测试
SQL> select count(*) from ;
COUNT(*)
----------
1276
阅读(1035) | 评论(0) | 转发(1) |