In this Document
CONFIGURATION
Node2
Listener.ora
(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
Tnsnames.ora
(ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip.idc.oracle.com)(PORT = 1521))
The following command should succeed on node2
$ tnsping node2_local
Set the local_listener for node2
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
(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))
)
)
The following command should succeed on all the nodes
$ tnsping node_remote
Set the remote listeners to both the nodes
Client Side Load Balancing
Following is an example of TNS net service alias for client side load balancing
(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
(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
(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
(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 FailoverNOTE: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/