阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Oracle BEQ方式连接配置

183次阅读
没有评论

共计 2486 个字符,预计需要花费 7 分钟才能阅读完成。

Oracle BEQ 方式连接配置,服务端和客户端在同一台机器上,可以使用 BEQ 连接,BEQ 连接可以理解为进程间直接通信,不需要走网络监听,性能更高。

可以参考 MOS:How To Connect Using the Bequeath Protocol (BEQ) in 8I (文档 ID 181317.1)

Beq connection can be used between client and server on the same machine.
Connection is not using listener, so no listener configuration is required.
In tnsnames.ora add tns alias:

Under Microsoft Windows operating systems PROGRAM should contain only “
oracle”:
(PROGRAM = oracle)
without any path or suffix.
For example, connecting to T816 through BEQ protocol with ORACLE_HOME=
/u08/oracle/product/8.1.6/bin/oracle
can be done using folowing tns alias:
T816-BEQ.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = BEQ)
(PROGRAM = /u08/oracle/product/8.1.6/bin/oracle)
(ARGV0 = oracleT816)
(ARGS = ‘(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))’)
(ENVS = ‘ORACLE_HOME=/u08/oracle/product/8.1.6,ORACLE_SID=T816’)
)
)
(CONNECT_DATA = (SID = T816))
)
To connect to T816 using Bequeth protocol now use:
sqlplus system/manager@T816-BEQ

例如,我们在 10.2.0.5 RAC 的实例 1 上配置 BEQ 连接测试

1. 在 tnsnames.ora 配置文件添加如下内容:

RACBEQ =
  (DESCRIPTION =
    (ADDRESS = 
      (PROTOCOL = BEQ)
      (PROGRAM = /u01/app/oracle/product/10.2.0.5/dbhome_1/bin/oracle)
      (ARGV0 = oraclejyrac1)    
      (ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))')
      (ENVS = 'ORACLE_HOME=/u01/app/oracle/product/10.2.0.5/dbhome_1,ORACLE_SID=jyrac1')
    )
    (CONNECT_DATA =
      (SERVICE_NAME = jyrac)
      (INSTANCE_NAME = jyrac1)
    )
  )

2. tnsping 测试通:

[oracle@oradb27 admin]$ tnsping racbeq

TNS Ping Utility for Linux: Version 10.2.0.5.0 - Production on 24-JAN-2017 18:05:48

Copyright (c) 1997,  2010, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = BEQ) (PROGRAM = /u01/app/oracle/product/10.2.0.5/dbhome_1/bin/oracle) (ARGV0 = oraclejyrac1) (ARGS = '(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))') (ENVS = 'ORACLE_HOME=/u01/app/oracle/product/10.2.0.5/dbhome_1,ORACLE_SID=jyrac1')) (CONNECT_DATA = (SERVICE_NAME = jyrac) (INSTANCE_NAME = jyrac1)))
OK (30 msec)

3. 本地通过 BEQ 协议连接到数据库:

[oracle@oradb27 admin]$ sqlplus system/oracle@racbeq

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Jan 24 17:37:08 2017

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> !ps -ef|grep BEQ
oracle    8102     1  0 17:37 ?        00:00:00 oraclejyrac1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))
oracle    8133  8100  0 17:37 pts/3    00:00:00 /bin/bash -c ps -ef|grep BEQ

SQL> 

上面查看进程也可以确定进程确实是通过 BEQ 协议连接的。

更多 Oracle 相关信息见 Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-01/139941.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计2486字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中