|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
“MySQL实际上是一个数据库家族,你可以从选择一个并将其配置成可以满足你的大多数情况,”开源顾问公司Ethiqa的总裁如此表示,“因此,你可以在开始的时候选择一个小巧的版本产品,以后再根据需要来对其进行性能或大小上的扩展。”oracle|通明
ORACLE完成异种数据库毗连服务的手艺叫做通明网关(TransparentGateway)。
今朝ORACLE使用通明网关能够完成和SQLSERVER、SYBASE、DB2等多种支流数据库的互联。
笔者因为事情必要,经由过程oracle会见sybase数据库,把设置oracle9iTRANSPARENTGATEWAYFORSYBASE
的步骤写成文档,供必要的网友参考!
设置TRANSPARENTGATEWAYFORSYBASE步骤
1.
oracle地点服务器上安装sybaseclient(大概在统一台server上安装oracle、sybase服务器)
确保可以会见sybase数据库
2.
安装TRANSPARENTGATEWAYFORSYBASE选件,要用自界说安装。
准确选择sybase的安装目次
3.
选择一个sid字符串筹办赋给sybase数据库。如:tg4sybs
设置SYBASE的dll路径到情况变量PATH(这一步很主要)
4.
修正初始化文件,默许的是:
ORACLE_HOME g4sybsadmininittg4sybs.ora
设置参数
HS_FDS_CONNECT_INFO
格局:HS_FDS_CONNECT_INFO=server_name.database_name[,INTERFACE=interface_file]
server_name.database_name是巨细写敏感的。
INTERFACE可选
例子:以下
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#ThisisasampleagentinitfilethatcontainstheHSparametersthatare
#neededfortheTransparentGatewayforSybase
#
#HSinitparameters
#
HS_FDS_CONNECT_INFO=migration_serv.tax
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
#
#EnvironmentvariablesrequiredforSybase
#
setSYBASE=d:ybase
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
上例中
server_name是migration_serv
database_name是tax
5.
设置oracle收集服务的listener,设置文件是:listener.ora
默许路径:ORACLE_HOME
etworkadmin
到场以下
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=gateway_sid)
(ORACLE_HOME=oracle_home_directory)
(PROGRAM=tg4sybs)
)
)
gateway_sid就是3选择的sid字符串
oracle_home_directory是ORACLE_HOME
tg4sybs如果SYBASE是特定的。假如是其他数据库,会分歧。
例子以下:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
(SID_DESC=
(SID_NAME=tg4sybs)
(ORACLE_HOME=D:oracleora92)
(PROGRAM=tg4sybs)
)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
6.
中断监听
lsnrctlstop
从头启动监听程序
lsnrctlstart
7.
设置oracleserver的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:oracleserver的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.创建databaselink
如:
CREATEDATABASELINKsybsCONNECTTOsa
IDENTIFIEDBYprient
USINGSBYS;
便可会见sybase数据库。
必要注重的是,sybase数据库的表名,字段名,假如是小写的,那末在oracle里会见的时分要加上双引号""
如:
SQL〉select"a"from"b"@sybs;
你碰到的问题可能已经在社区中被别的人已经问过,即使没有MySQL学习教程,你也可以提出问题或通过Google来搜索答案。社区的相关负责人士:“MySQL社区是活跃、友好和内容渊博的。” |
|