You are on page 1of 4

Purpose

• Configuration of perfect TCP/IP and SQL*Net to get absolute stable Oracle Real
Application Clusters

This is a brief overview about everything required to get a stable RAC network
environment.
For more details read Oracle Note:151972.1, Note:249213.1 , Note:1019963.102
This document shows my experiences with Dead Connection Detection. My
recommendation is to implement Oracle Note 249213.1 to get a real working Dead
Connection Detection and Transparent Applictation Failover not using TAF
(How_to_configure_TAF).
The configuration below is excellent in a RAC environment using active/passive node on
a RAC. For example you have a two node RAC and only one node is active and the other
is a 'Hot Standby' node than this configuration will allow a fast switchover to the second
node in case of failure of the first one.

Installation
• This article describes a complete overview about what to do to get stable
networking.

Usage
• Implement the given configuration steps as required by your operating systems

• Do a test if there are firewalls between your Oracle Real Application Cluster and
the Client Software

Recommendations
• Always implement changes in a production environment after having some test in
a lab.

The usage of "enable=broken" and the necessary changes of the IP stack are well tested.
In normal situations a system do not need these settings because in most cases Oracle's
PMON will detect a lost session and also the client will detect itself that a session was
closed unexpected.
Settings described here are for rare cases which the normal settings do not solve
sufficient.
Settings recommended here are just recommended to have always the planned behaviour.

Example(s)
Real Application Cluster on an AIX 5.3 site and OCI clients on a Windows 2003
server site
Configurations steps on the RAC in sqlnet.ora

• Enable standard Oracle Dead Connection Detection


sqlnet.inbound_connect_timeout (server) -- Not required
sqlnet.send_timeout (client and/or server) -- Not required
sqlnet.recv_timeout (client and/or server) -- Not required
The next parameter is the one Dead Connection Detection should start. Read Oracle
Note:151972.1 for more details and problems.
SQLNET.EXPIRE_TIME=<n> (server) -- Use this but it may produce ORA-
12612 "TNS:connection is busy"
Configuration steps required for different operating systems to change standard
TCP behavior

• AIX TCP parameters


tcp_keepidle=120
tcp_keepinit=150
tcp_keepintvl=80

AIX TCP_KEEPIDLE
Description: This determines the length of inactivity before keepalive
messages are sent
and ensuring how long a connection stays in an active/ESTABLISHED state.
Default value: 14400 (in half seconds, which is 2 hours)

TCP_KEEPINTVL
Description: Specifies how often these keepalive probe messages are
sent.
The connection is considered broken after 8 unresponded probes.
Default value: 150 (in half seconds which is 75 seconds)

TCP_KEEPINIT
Description: Specifies the initial timeout value for TCP connections.
Default value: 150 (in half seconds which is 75 seconds)

To check the current setting, type "no -a", to change the settings.
So, as root, issue "no -o <option>=<value>", e.g.:

no -o tcp_keepidle=1200
no -o tcp_keepintvl=40
• Linux TCP parameters
net.ipv4.tcp_keepalive_time 3000
net.ipv4.tcp_retries2 5
net.ipv4.tcp_syn_retries 1

• Solaris TCP parameters


tcp_ip_abort_cinterval = 10000 (default is 180000)
tcp_keepalive_interval = 240000 (default is 7200000)
tcp_ip_abort_interval = 60000 (default is 480000)

• Windows TCP parameters


You change microsoft TCP parameters in the registry, under:
HKEY_LOCAL_MACHINE\System\CurrectControlSet\services\Tcpip\Parameters
(TcpTimedWaitDelay, and KeepAlive)
To do this:
* Backup the registry ...
* Open the registry hive under HKEY_LOCAL_MACHINE:SYSTEM
(CurrentControlSet:Services:TCPIP:Parameters)
* Add KeepAliveTime : REG_DWORD to the registry (Note: The correct case
is required for KeepAlive)
* Set the value to a reasonable timeout. Eg:(120000 = 2 minutes)
* Save this
* Reboot
For additional information, please see the following articles on the Microsoft support web
site (support.microsoft.com): Q120642, Q102974, and Q170359.

• Enable "Real" Dead Connection Detection in clients tnsnames.ora


DeadConnectionRAC =
(DESCRIPTION =
(ENABLE=BROKEN) ####<< Place entry here to enable TCP
KeepAlive mechanism
(LOAD_BALANCE = OFF)
(FAILOVER = ON)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = prod_rac)
)
The point is to activate "ENABLE=BROKEN" in tnsnames.ora at client site. The
parameter must be located directly after the equal sign of description to activate the
feature! All the other configuration steps may change the duration of a successful
failover but this parameter activates this!
Security related issues
• It's possible that you will have some trouble using this configuration if there is a
firewall between your client and your server

You might also like