The Transparent Network Substrate (TNS), provided by Oracle, allows
distributed communications between databases and it's the tnsnames.ora file
that governs the TNS.
For example, a entry in the tnsnames.ora
file for a database might look like this:
(COMMUNITY = TCP)
(PROTOCOL = TCP)
(HOST = hun)
(PORT = 1521)
= (SID = kraus))
Let's see how the tnsnames.ora is used to resolve a connection.
In the tnsnames.ora example above we see a TNS service name of
berlin, which defines a connection to a server named hun that
contains an $ORACLE_SID named kraus. When a remote connection request
is made from the UNIX/Linux server, the /etc/host file is accessed to
get the IP address for the hun server. From the listing
below, we see that the hum server is located at 126.96.36.199. As we
see, the /etc/host file is used to isolate the IP address from the
Tuning with the tnsnames.ora file
The session data unit (SDU)
and transport date unit (TDU) parameters are located in both the
tnsnames.ora and listener.ora files. SDU specifies the size of
the packets to send over the network and ideally, SDU should not surpass the
size of the maximum transmission unit (MTU).
MTU is a fixed value parameter in the
tnsnames.ora that depends on the actual network implementation used.
Oracle recommends that SDU be set equal to MTU in the tnsnames.ora
The TDU is the default packet size used within Oracle Net to
group data together. The TDU parameter should ideally be a multiple of the
SDU parameter. The default value for both SDU and TDU is 2,048, and the
maximum value is 32,767 bytes. The following guidelines apply to SDU
- The SDU should never be set greater
than TDU in the tnsnames.ora file because you'll waste network
resources by shipping wasted space in each packet.
- If your users are connecting via modem
lines, you may want to set SDU and TDU to smaller values in your
because of the frequent resends that occur
over modem lines.
- On fast network connections (T1 or T3
lines), you should set SDU and TDU equal to the MTU for your network. On
standard Ethernet networks, the default MTU size for the
is set to 1,514 bytes. On standard token
ring networks, the default MTU size is 4,202.
- If the Multi-Threaded Server (MTS)
must is used (not recommeneded), you must also set the
mts_dispatchers with the proper MTU TDU configuration in the
- For Streams replication and for using
Oracle in a WAN environment, Oracle recommends that you increase the SDU