Oracle客户端配置tnsnames.ora

examples:

DFDZ_DATASRV =
  (DESCRIPTION =
    (ADDRESS_LIST =
     (FAILOVER=ON)
      (LOAD_BALANCE=off)
      (ADDRESS = (PROTOCOL = TCP)(HOST = ibmRS6002)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = dfdzs1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

FAILOVER

Purpose

Use the parameter FAILOVER to enable or disable connect-time failover for multiple protocol addresses.

When you set the parameter to on, yes, or true, Oracle Net, at connect time, fails over to a different address if the first protocol address fails. When you set the parameter to off, no, or false, Oracle Net tries one protocol address.

Embed this parameter under either the DESCRIPTION_LIST parameter, the DESCRIPTION parameter, or the ADDRESS_LIST parameter.


Important:

Do not set the GLOBAL_DBNAME parameter in the SID_LIST_listener_name section of the listener.ora. A statically configured global database name disables connect-time failover.


Default

on for DESCRIPTION_LISTs, DESCRIPTIONs, and ADDRESS_LISTs

Values

on | off | yes | no | true | false

Example

net_service_name=  (DESCRIPTION=  (FAILOVER=on)  (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))  (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))  (CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com))) 

LOAD_BALANCE

Purpose

Use the parameter LOAD_BALANCE to enable or disable client load balancing for multiple protocol addresses.

When you set the parameter to on, yes, or true, Oracle Net progresses through the list of addresses in a random sequence, balancing the load on the various listener or Oracle Connection Manager protocol addresses. When you set the parameter to off, no, or false, Oracle Net tries the protocol addresses sequentially until one succeeds.

Embed this parameter under either the DESCRIPTION_LIST parameter, the DESCRIPTION parameter, or the ADDRESS_LIST parameter.

Default

on for DESCRIPTION_LISTs

Values

on | off | yes | no | true | false

Example

net_service_name=  (DESCRIPTION=  (LOAD_BALANCE=on)  (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))  (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))  (CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)) 

相关参考文档:

http://www.cise.ufl.edu/help/database/oracle-docs/network.920/a96581/tnsnames.htm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值