配置oracle透明网关的问题
由于最近开发遇到要连异构数据库的问题,所以尝试着配置了下透明网关,一个星期了,资料倒是看了不少,就是没有结果,求哪位大牛帮忙看看吧。先谢过了~~
下面是我的配置和错误:
sqlserver2005:172.16.3.202.okfoc
oracle:172.16.26.113的F:\oracle\product\10.2.0\db_1
透明网关:172.16.26.113的E:\oracle\product\10.2.0\tg_1
下面的配置是在透明网关目录下的
listener.ora:
# listener.ora Network Configuration File: E:\oracle\product\10.2.0\tg_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC=
(SID_NAME=OKFOC)
(ORACLE_HOME = E:\oracle\product\10.2.0\tg_1)
(PROGRAM=tg4msql)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = H7U464JGIHICJS8)(PORT = 1521))
)
)
tnsnames.ora:
# tnsnames.ora Network Configuration File: E:\oracle\product\10.2.0\tg_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
OKFOC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.26.113)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = okfoc)
)
(HS = OK)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = H7U464JGIHICJS8)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
tnsping和监听状态:
E:\oracle\product\10.2.0\tg_1\BIN>tnsping okfoc
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 07-12月-
2012 13:58:20
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
E:\oracle\product\10.2.0\tg_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 172.16.26.113)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = okfoc)) (H
S = OK))
OK (50 毫秒)
E:\oracle\product\10.2.0\tg_1\BIN>lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 07-12月-2012 13:5
8:34
Copyright (c) 1991, 2005, Oracle. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER 的 STATUS
------------------------
别名 LISTENER
版本 TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
启动日期 07-12月-2012 13:57:40
正常运行时间 0 天 0 小时 0 分 53 秒
跟踪级别 off
安全性 ON: Local OS Authentication
SNMP OFF
监听程序参数文件 E:\oracle\product\10.2.0\tg_1\network\admin\listener.o
ra
监听程序日志文件 E:\oracle\product\10.2.0\tg_1\network\log\listener.log
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=H7U464JGIHICJS8)(PORT=1521)))
服务摘要..
服务 "OKFOC" 包含 1 个例程。
例程 "OKFOC", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "PLSExtProc" 包含 1 个例程。
例程 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功
DBLink的创建和测试及错误:
SQL> create public database link okfoc connect to okfoc identified by "okfoc" us
ing 'okfoc';
数据库链接已创建。
SQL> select * from t_flt_version@okfoc;
select * from t_flt_version@okfoc
*
第 1 行出现错误:
ORA-28500: 连接 ORACLE 到非 Oracle 系统时返回此信息:
[Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL
Server]无法打开登录所请求的数据库 "okfoc"。登录失败。 (SQL State: 00000; SQL
Code: 4060)
ORA-02063: 紧接着 2 lines (起自 OKFOC)
[解决办法]
多加一个监听器
[解决办法]