WEB开发网
开发学院数据库Sybase ORACLE 9i连接SYBASE的透明网关的配置 阅读

ORACLE 9i连接SYBASE的透明网关的配置

 2010-06-10 15:12:06 来源:WEB开发网   
核心提示:7.配置oracle server的tnsnames.ora使其能够访问sybaseconnect_descriptor=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST= host_name)(PORT= port_number))(CONNECT_DATA=(SID= gatewa

7.配置oracle server的tnsnames.ora使其能够访问sybase

connect_descriptor=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST= host_name)
(PORT= port_number)
)
(CONNECT_DATA=
(SID= gateway_sid))
(HS=OK))

connect_descriptor是连接串,任取,一般为sybs

host_name:oracle server的name

port_number:oracle监听端口

gateway_sid就是3选择的sid字符串

例子如下:

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

sybs=
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=TCP)(HOST= dw-server1)(PORT= 1521))
)
(CONNECT_DATA=
(SID= tg4sybs)
)
(HS=OK)
)

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

8.建立database link

如:

CREATE DATABASE LINK sybs CONNECT TO sa
IDENTIFIED BY prient 
USING "SBYS" ;

即可访问sybase 数据库。

需要注意的是,sybase数据库的表名,字段名,如果是小写的,那么在oracle里访问的时候要加上双引号""

如:

SQL〉select "a" from "b"@sybs;

上一页  1 2 3 

Tags:ORACLE 连接 SYBASE

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接