A :
请参考.
--建立ORACLE到SQL SERVER的分布式--
1、安装 Microsoft Data Access Components (MDAC)SDK ODBC driver
2、test whether CATHS has run.connect to the Oracle server
as schema "SYSTEM" and do "DESCRIBE SYS.HS_FDS_CLASS".
If it does not exist, connect as SYS (or internal) and run
the CATHS script. (ORACLE_HOME/RDBMS/ADMIN/CATHS.SQL)
3、建立 SQL SERVER 数据源
TEST_SQLSERVER
4、配置tnsnames.ora. (ORACLE_HOME/NETWORK/ADMIN)
TEST_SQLSERVER =
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=tcp)
(HOST=<IP地址>)
(PORT=1521)
)
(CONNECT_DATA=
(SID=TEST_SQLSERVER)
)
(HS=)
)
5、配置listener.ora. (ORACLE_HOME/NETWORK/ADMIN)
(SID_DESC=
(SID_NAME=TEST_SQLSERVER)
(ORACLE_HOME=D:/Oracle/iSuites)
(PROGRAM=hsodbc)
)
6、重启ORACLE监听.
CMD
LSNRCTL STOP
LSNRCTL START
LSNRCTL STATUS
7、添加网关配置文件. (ORACLE_HOME/HS/ADMIN)
文件名为:initTEST_SQLSERVER.ora
文件内容:
#
# HS init parameters
#
HS_FDS_CONNECT_INFO = TEST_SQLSERVER
HS_FDS_TRACE_LEVEL = 0
#HS_FDS_TRACE_FILE_NAME = TEST_SQLSERVER.trc
#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>
8、进入ORACLE SQL*PLUS,建立数据库链.
CREATE DATABASE LINK TOSQL USING 'TEST_SQLSERVER';