分享
 
 
 

配置透明网关的步骤

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

基本步骤

说明:

HostName:dmserver

Win2000 Server Oracle Database 9.2.0.1.0 Microsoft SQL Server 2000

UserName:User PassWord:User

Database:CFDai TableName:Test

都使用 tcp/ip 默认端口1521

基本步骤:

1: 安装 TRANSPARENT GATEWAY FOR MSSQL选件,输入主机名和数据库名

安装完后,在d:\oracle\ora92的目录下产生一个目录D:\oracle\ora92\tg4msql

同时,自动生成文件:inittg4msql.ora

其中内容为:

HS_FDS_CONNECT_INFO=dmserver.CFDai #服务器名.数据库名

HS_FDS_TRACE_LEVEL=OFF

HS_FDS_RECOVERY_ACCOUNT=RECOVER

HS_FDS_RECOVERY_PWD=RECOVER

注:第一行可写为HS_FDS_CONNECT_INFO="dmserver;DATABASE=CFDai"

2: 配置 LISTENER.ORA

SID_LIST_LISTENER =

(SID_LIST =

……

(SID_DESC =

(GLOBAL_DBNAME = tg4msql) #可重命名

(PROGRAM = tg4msql)

(SID_NAME = tg4msql) #可重命名

(ORACLE_HOME = D:\oracle\ora92) #数据库主目录名

)

)

3: 停止并重启 DATABASE 和 LISTENER服务

4: 配置 tnsnames.ora,在文件尾增加以下内容:

tg4msql =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = dmserver)(PORT = 1521))

)

(CONNECT_DATA =

(SID = tg4msql)

)

(HS=OK)

)

5: 在SQL Plus或SQLPlus Worksheet中通过如下语句建立数据库连接

CREATE PUBLIC DATABASE LINK DB_SQL CONNECT TO User IDENTIFIED by User USING 'tg4msql';

6: 在SQL Plus或SQLPlus Worksheet中测试

select * from test@DB_SQL;

7:取消数据库连接

DROP PUBLIC DATABASE LINK DB_SQL;

FW:多谢!我也刚刚搞定。

原来是一个低级错误——tnsnames.ora文件配置错误(直接拷贝后修改,结果没改主机地址!指到别的地方了:):))。另外注重:lsnrctl中显示status=unknow不必惊奇,正常。

今天阅读了Oracle 9i附带的Oracle Transparent Gateways文档,整理了一下,供参考!

搜索要害字:

Oracle Transparent Gateways

透明网关

Oracle database applications can be executed against non-Oracle database servers using SQL*Connect or the Oracle Open Gateway.

Oracle Transparent Gateways

The capabilities, SQL mappings, data type conversions, and interface to the remote non-Oracle system are contained in the gateway. The gateway interacts with Heterogeneous Services to provide the transparent connectivity between Oracle and non-Oracle systems.

The gateway can be installed on any machine. It can be on the same machine as the Oracle database or on the same machine as the non-Oracle system or on a third machine as a standalone. Each configuration has its advantages and disadvantages. The issues to consider when determining where to install the gateway are network traffic,

operating system platform availability, hardware resources and storage.

Configuring the Gateway

After installing the gateway(supplied with Oracle 9i setup package), perform the following tasks to configure the gateway for Microsoft SQL Server:

1.Configuring the Gateway(ORACLE_HOME\tg4msql\admin\init.ora on gateway side)

2.Configuring Oracle Net Services Listener for the Gateway(listener.ora on gateway side)

3.Configuring the Oracle Database Server for Gateway Access(tnsnames.ora on oracle side)

4.Creating Database Links(on oracle side)

1.Configuring the Gateway

Task 1: Choose a System Identifier for the Gateway

The gateway system identifier (SID) is an alphanumeric character string that identifies a gateway instance.The SID is used as part of the file name for the initialization parameter file.

Task 2: Customize the Initialization Parameter File

The initialization parameter file must be available when the gateway is started.

如:ORACLE_HOME\tg4msql\admin\initmytg4msql.ora

注重:HS_FDS_CONNECT_INFO= server_name.database_name

HS_FDS_DEFAULT_OWNER = 缺省用户

2.Configuring Oracle Net Services Listener for the Gateway

The gateway requires Oracle Net Services to provide transparent data access. After configuring the gateway, configure Oracle Net Services to work with the gateway.

Configure Oracle Net Services TNS Listener for the Gateway

If you are already running a TNS listener that listens on multiple database SIDs, add only the following syntax to SID_LIST in the existing listener.ora file:

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=.

.

)

(SID_DESC=.

.

)

(SID_DESC=

(SID_NAME=mytg4msql)

(ORACLE_HOME=oracle_home_Directory)

(PROGRAM=tg4msql)

)

)

3.Configuring the Oracle Database Server for Gateway Access

Before you use the gateway to access Microsoft SQL Server data you must configure the Oracle database server to enable communication with the gateway over Oracle Net Services.

Configuring Oracle Net Services for the Oracle Database Server

The tnsnames.ora file is required by the Oracle database server accessing the gateway, but not by the gateway. Edit the tnsnames.ora file to add a connect descriptor for the gateway.:

connect_descriptor=

(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCP)

(HOST= host_name)

(PORT= port_number)

)

(CONNECT_DATA=

(SID= mytg4msql))

(HS=OK))--(HS=OK) specifies that this connect descriptor uses the Oracle Heterogeneous Services option.

4.Creating Database Links

接下来:Configuring the Gateway for Multiple Microsoft SQL Server Databases

1.Configuring the Gateway

Create Two Initialization Parameter Files

cd ORACLE_HOME\tg4msql\admin

copy inittg4msql.ora inittg4msql2.ora

copy inittg4msql.ora inittg4msql3.ora

Change the value of the HS_FDS_CONNECT_INFO parameter in the new files.

For inittg4msql2.ora,

enter the following:

HS_FDS_CONNECT_INFO=msql_nt2.db2

For inittg4msql3.ora, enter the following:

HS_FDS_CONNECT_INFO=msql_nt3.db3

2.Configuring Oracle Net Services Listener for the Gateway

Add Entries to listener.ora

Add two new entries to the TNS listener configuration file, listener.ora.

SID_LIST_LISTENER=

(SID_LIST=

(SID_DESC=

(SID_NAME=tg4msql)

(ORACLE_HOME= oracle_home_directory)

(PROGRAM=tg4msql)

)

(SID_DESC=

(SID_NAME=tg4msql2)

(ORACLE_HOME= oracle_home_directory)

(PROGRAM=tg4msql)

)

(SID_DESC=

(SID_NAME=tg4msql3)

(ORACLE_HOME= oracle_home_directory)

(PROGRAM=tg4msql)

)

)

3.Configuring the Oracle Database Server for Gateway Access

tnsnames.ora :

old_db_using=(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCP)

(PORT=1541)

(HOST=gtwhost))

(CONNECT_DATA=

(SID=tg4msql))

(HS=OK))

new_db2_using=(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCP)

(PORT=1541)

(HOST=gtwhost))

(CONNECT_DATA=

(SID=tg4msql2))

(HS=OK))

new_db3_using=(DESCRIPTION=

(ADDRESS=

(PROTOCOL=TCP)

(PORT=1541)

(HOST=gtwhost))

(CONNECT_DATA=

(SID=tg4msql3))

(HS=OK))

4.Creating Database Links

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有