【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase

在已装有Oracle DB 10gR2的windows 环境下安装 gateway 11g for sybase


1.建立安装目录

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第1张图片

 


2.使用OUI安装

注意:win7下安装要使用管理员身份、兼容模式运行程序,否则会报“程序异常终止”的错误。

 【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第2张图片


【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第3张图片

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第4张图片


注意:由于数据库版本与gateway版本不同,因此不能在原oracle_home目录下安装gateway,要使用新目录,否则bin下的程序会被覆盖,导致oracle软件不可用。

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第5张图片

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第6张图片

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第7张图片

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第8张图片

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第9张图片

此处是配置监听,由于我之前配置了,因此不在这里配置。这里配置失败的原因是环境变量oracle_home没有设置为gateway的安装目录,如果安装之前设置成功则该步不会失败,并配置成功新的监听。


【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第10张图片




3.确认或修改HS初始话参数文件initdg4sybs.ora

# This isa customized agent init file that contains the HS parameters

# thatare needed for the Database Gateway for Sybase

 

#

# HS initparameters

#

HS_FDS_CONNECT_INFO=[192.168.131.57]:4100/ssdd

HS_FDS_TRACE_LEVEL=OFF

HS_FDS_RECOVERY_ACCOUNT=RECOVER

HS_FDS_RECOVERY_PWD=RECOVER

这个是我们之前安装gateway写的sybase数据库连接信息,如果当初没有写错,则无需修改,忽略此步。


4.修改监听,增加静态监听服务

#listener.ora Network Configuration File: F:\app\NETWORK\ADMIN\listener.ora

#Generated by Oracle configuration tools.

 

SID_LIST_LISTENER=

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = F:\app)

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (GLOBAL_DBNAME = shdb)

      (ORACLE_HOME = F:\app)

      (SID_NAME = shdb)

    )

    (SID_DESC =

      (SID_NAME =dg4sybs)       --initdg4sybs.ora一致

      (ORACLE_HOME =F:\gateway)        --gateway安装目录(bin的上级目录)

      (PROGRAM = F:\gateway\BIN\dg4sybs.exe)               

--windows下是exe类型文件,必须加上全路径!

    )

  )

 

LISTENER=

  (DESCRIPTION_LIST =

    (DESCRIPTION =

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

    )

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY =EXTPROC0))

    )

  )

 

ADR_BASE_LISTENER = F:\app

 

配置好之后,重启监听

注意:环境变量path中,oracle_home所在的bin路径必须放在最前面,否则会报错。

 

5.配置tnsnames.ora

--加入以下内容

dg4sybs =

  (DESCRIPTION=

   (ADDRESS=(PROTOCOL=tcp)(HOST=xqwu)(PORT=1521))

    (CONNECT_DATA=(SID=dg4sybs))

    (HS=OK)

  ) 

 

--用 tnsping dg4sybs测试一下:

C:\Windows\system32>tnsping dg4sybs

 

TNS PingUtility for 32-bit Windows: Version 10.2.0.1.0 - Production on 11-JUN-201411:29:06

 

Copyright(c) 1997, 2005, Oracle.  All rightsreserved.

 

Usedparameter files:

 

 

UsedTNSNAMES adapter to resolve the alias

Attemptingto contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=xqwu)(PORT=1521))(CONNECT_DATA=(SID=dg4sybs)) (HS=OK))

OK (30msec)

 

 

6.建立db_link

CREATE  DATABASELINK sybase_ssdd_linkCONNECTTO "sa" IDENTIFIED BY" "USING 'dg4sybs'

 

7.测试

select count(*)from"XQW_ERROR_INFO"@sybase_ssdd_link; 

COUNT(*)

----------

    140928

1 row selected.

 

成功!


8.建立新的sybase数据库连接

1.新建initdg4sybs2.ora

【Gateway安装】Windows 下 已存在DB10gR2 安装Gateway11gR2 for sybase_第11张图片


# This isa customized agent init file that contains the HS parameters

# thatare needed for the Database Gateway for Sybase

 

#

# HS initparameters

#

HS_FDS_CONNECT_INFO=[192.168.131.57]:4100/amtrix

HS_FDS_TRACE_LEVEL=OFF

HS_FDS_RECOVERY_ACCOUNT=RECOVER

HS_FDS_RECOVERY_PWD=RECOVER

 

2.新增tns服务

dg4sybs2 =

  (DESCRIPTION=

   (ADDRESS=(PROTOCOL=tcp)(HOST=xqwu)(PORT=1521))

    (CONNECT_DATA=(SID=dg4sybs2))                     --与initdg4sybs2.ora一致

    (HS=OK)

  )

 

3.修改并重启listener

SID_LIST_LISTENER=

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = F:\app)

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (GLOBAL_DBNAME = shdb)

      (ORACLE_HOME = F:\app)

      (SID_NAME = shdb)

    )

    (SID_DESC =

      (SID_NAME = dg4sybs)

      (ORACLE_HOME = F:\gateway)

      (PROGRAM = F:\gateway\BIN\dg4sybs.exe)

    )

    (SID_DESC =

      (SID_NAME =dg4sybs2)     --initdg4sybs2.ora一致

      (ORACLE_HOME =F:\gateway)

      (PROGRAM =F:\gateway\BIN\dg4sybs.exe)

    )

  )

 

4.建立db_link

CREATE  DATABASELINK sybase_amtrix_linkCONNECT TO "sa"IDENTIFIED BY" " USING 'dg4sybs2';

 

5.测试

select * from "test"@sybase_amtrix_link;

id            

---------------

3             

1 row selected.

 

成功!




Sharon

2014.06.12


----------------------------------------------------------------------------------------------

转载须注明出处!

http://blog.csdn.net/sharqueen_wu/article/details/30238743

转载须注明出处!

http://blog.csdn.net/sharqueen_wu/article/details/30238743

转载须注明出处!

http://blog.csdn.net/sharqueen_wu/article/details/30238743










你可能感兴趣的:(oracle工具,Oracle,Gateway)