WEB开发网
开发学院数据库Sybase 配置TRANSPARENT GATEWAY FOR SYBASE步骤 阅读

配置TRANSPARENT GATEWAY FOR SYBASE步骤

 2010-02-07 15:12:19 来源:WEB开发网   
核心提示:gateway_sid就是3选择的sid字符串oracle_home_directory是ORACLE_HOMEtg4sybs若是SYBASE是特定的,如果是其他数据库,配置TRANSPARENT GATEWAY FOR SYBASE步骤(2),会不同,例子如下:$$$$$$$$$$$$$$$$$$$$$$$$$$$$

gateway_sid就是3选择的sid字符串

oracle_home_directory是ORACLE_HOME

tg4sybs若是SYBASE是特定的。如果是其他数据库,会不同。

例子如下:

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
(SID_DESC=
(SID_NAME=tg4sybs)
(ORACLE_HOME = D:oracleora92)
(PROGRAM=tg4sybs)
)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

6.停止监听

lsnrctl stop

重新启动监听程序

lsnrctl start

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 

Tags:配置 TRANSPARENT GATEWAY

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