Configuration of TAFand Load Balancing

10g & 11g :Configuration of TAF(Transparent Application Failover) and Load Balancing [ID 453293.1]   修改时间 18-JUL-2011     类型 HOWTO     状态 PUBLISHED  

In this Document
  
     
CONFIGURATION
     
     

     

  

 

Node2

Listener.ora

LISTENER_NODE2=    
(DESCRIPTION =   
 (ADDRESS_LIST =           
 (ADDRESS=(PROTOCOL=TCP)(HOST=node2.idc.oracle.com)(PORT=1521)(IP=FIRST))   
 (ADDRESS=(PROTOCOL=TCP)(HOST=node2-vip.idc.oracle.com)(PORT=1521)(IP=FIRST))   
 )   
)

Start the listener

$ lsnrctl start LISTENER_NODE2

Tnsnames.ora

NODE2_LOCAL=  
   (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.idc.oracle.com)(PORT = 1521)) 

 

Note: Make sure this tns alias NODE2_LOCAL is resolvable on the server, this ensures PMON picksup the entry without problem.
The following command should succeed on node2
$ tnsping node2_local

Set the local_listener for node2

sql > alter system set LOCAL_LISTENER='node2_local' scope=both sid='sid2' ;  

Enable the server side Load balancing (if required)
You should make the the listeners aware of adjacent nodes load to do the server side load balance.
To make PMON to notify the load information to adjacent nodes,  you should set the REMOTE_LISTENER parameter.

Add the following tnsalias in both the nodes tnsnames.ora
Node1 & Node2 Tnsnames.ora

NODE_REMOTE =
(DESCRIPTION =  
 (ADDRESS_LIST =   
  (ADDRESS = (PROTOCOL = TCP)(HOST=node1-vip.idc.oracle.com)(PORT = 1521))   
  (ADDRESS = (PROTOCOL = TCP)(HOST=node2-vip.idc.oracle.com)(PORT = 1521))   
 )  

 

Note: Make sure this tns alias NODE_REMOTE is resolvable on all the servers, this ensures PMON picksup the entry without problem.
The following command should succeed on all the nodes
$ tnsping node_remote

Set the remote listeners to both the nodes

sql> alter system set REMOTE_LISTENER='node_remote' scope=both;

 

Client Side Load Balancing

Following is an example of TNS net service alias for client side load balancing

CLIENT_LOADBALANCE= 
 (DESCRIPTION = 
  (LOAD_BALANCE = yes) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.idc.oracle.com)(PORT = 1521)) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.idc.oracle.com)(PORT = 1521))  
  (CONNECT_DATA =  
   (SERVICE_NAME = service.idc.oracle.com)  
  ) 
 )

Connect Time Failover

Sample connect time failover TNS net service alias
address_list defaults the failover=on

CLIENT_FAILOVER= 
(DESCRIPTION =  
 (ADDRESS_LIST =  
  (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.idc.oracle.com)(PORT = 1521)) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.idc.oracle.com)(PORT = 1521))  
 ) 
 (CONNECT_DATA = 
   (SERVICE_NAME = service.idc.oracle.com) 
 ) 
)

Client Side Load Balance & Connect-time Failover Connect String

CLIENT_LOAD_FAILOVER=
(DESCRIPTION = 
 (ADDRESS_LIST = 
  (LOAD_BALANCE = yes) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.idc.oracle.com)(PORT = 1521)) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.idc.oracle.com)(PORT = 1521)) 
 ) 
 (CONNECT_DATA = 
  (SERVICE_NAME = service.idc.oracle.com) 
 ) 

 

TAF - Client Side Configuration

Failover Mode Type can be Either SESSION or SELECT.
Session failover will have just the session to failed over to the next available node.The select query will not be resumed.

You can refer the below document for various options on TAF
Oracle® Database Net Services Administrator's Guide
Chapter on Enabling Advanced Features of Oracle Net Services

Simple TAF can be configured on the client side tnsnames.ora with following entry

TAF=
(DESCRIPTION = 
 (ADDRESS_LIST =
  (LOAD_BALANCE = yes) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip.idc.oracle.com)(PORT = 1521)) 
  (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.idc.oracle.com)(PORT = 1521)) 
 )
 (CONNECT_DATA = 
   (SERVICE_NAME = service.idc.oracle.com) 
   (failover_mode=(type=select)(method=basic)) 
    ) 
  ) 

TAF - Server Side Configuration

From Oracle 10.2 onwards, TAF can be configured with server side at the time of service creation also.
Refer Note 460982.1 How To Configure Server Side Transparent Application
Failover

Troubleshooting Load Balance

Incase of server side load balancing not happening properly, to start diagonisng the issue you may collect the below set of information:

a. Is session load balance turned on ? 
b. What is the connection distribution on nodes ?
c. Is all the nodes are equal power w.r.t CPU / Memory / Hardware ?
d. Is there any application connecting locally (BEQueath connection) and doing big operations on any one of the node?
e. Are all the nodes are configured with proper settings of local / remote listeners?
Refer NOTE 263599.1 Understanding and Troubleshooting Instance Load Balancing

Troubleshooting TAF

Incase of client connectivity failure the ideal start point to diagonise the issue is with Client Sqlnet tracing at support Level

To enable the client tracing  Refer
NOTE 395525.1How to Enable Oracle SQLNet Client , Server , Listener , Kerberos and External procedure Tracing from Net Manager

While creating an Service Request with Oracle Support for TAF , provide the following information to diagonise the problem:

a. Failed connection client sqlnet tracing

b. Execute and provide the output of following commands from both the nodes:
    $ sql > show parameter Listener 
    $ sql> show parameter service
    $ lsnrctl  services

c. Upload the tnsnames.ora & Listener logs (by default created with .log) from both nodes.

References

NOTE:226880.1 - Configuration of Load Balancing and Transparent Application Failover
NOTE:342419.1 - ORA-12520: Listeners Running on VIP Address in 10g or Newer RAC
NOTE:395525.1 - How to Enable Oracle SQLNet Client , Server , Listener , Kerberos and External procedure Tracing from Net Manager

转载于:http://blog.itpub.net/7900083/viewspace-704898/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值