Parameters in the tnsnames.ora file
The basic format of the tnsnames.ora parameter
file is:
net_service_name=
(description=
(address=(protocol_address_information))
(connect_data=
(service_name=service_name)))
A sample tnsnames.ora entry might look like the
following:
ORATST=
(description=
(address_list=
(address = (protocol
= TCP)(host = fu.bar)(port = 1521))
)
(connect_data =
(service_name=oratst)
)
)
Where the following parameters are used:
- description parameter:
This tnsnames.ora parameter acts as a container
for a connect descriptor. It can be embedded under the
description_list parameter in the
tnsnames.ora file.
- description_list
parameter:
This tnsnames.ora parameter defines a list
of connect descriptors for a particular net service name
.
- address
parameter:
This tnsnames.ora parameter defines a single
listener protocol address. It can be embedded under the
address_list or description parameters
in the tnsnames.ora file.
- address_list
parameter:
This tnsnames.ora parameter defines
multiple listener protocol addresses. It is not
necessary if only one listener protocol address is used.
It can be embedded under the description or
description_list parameters in the tnsnames.ora
file.
For multiple addresses, the following description section
parameters are also available for the tnsnames.ora
file:
- enable
parameter:
Set to BROKEN to enable keepalive feature
on the supported TCP transports. By default, the
keepalive feature is OFF>
- failover
parameter:
Use this parameter to enable or disable
connect-time failover for multiple protocol addresses.
Setting the parameter to ON, YES or TRUE will result in
Oracle Net, at connect time, failing over to a different
address if the first protocol address fails. Setting the
parameter to OFF, NO or FALSE will result in Oracle Net
trying only one protocol address. The default is ON for
descriptions, description_lists and
address_lists.
- load_balance
parameter:
Use this parameter to enable or disable client load
balancing for multiple protocol addresses. Setting the
parameter to ON, YES or TRUE causes the Oracle Net to
progress through the list of addresses in a random
sequence, balancing the load on the various listener or
Oracle Connection Manager protocol addresses. Setting
the parameter to OFF, NO or FALSE will result in Oracle
Net sequentially trying the protocol addresses until one
works. The default is ON for description_lists.
- recv_buf_size
parameter:
Use this parameter, supported by TCP/IP, TCP/IP
with SSL and SDP protocols, to specify, in bytes, the
buffer space for receive operations of sessions. The
default for this parameter is OS specific.
- sdu
parameter:
Use this parameter in the connect descriptor,
embedded under the description parameter, on a
client to override the default_sdu_size
parameter in the client-side sqlnet.ora file in
order to optimize the transfer rate of data packages
across the network. The default setting is 8192 (8 KB),
and the available range is 512 to 32767 bytes.
- send_buf_size
parameter:
Use this parameter in the connect descriptor,
embedded under the description parameter, on a
client to override the send_buf_size parameter
in the client-side sqlnet.ora file. This
parameter, supported by TCP/IP, TCP/IP with SSL and SDP
protocols, specifies, in bytes, the buffer space for
send operations of sessions. The default for this
parameter is OS specific.
- source_route
parameter:
Set the source_route parameter to ON or
YES to enable routing through multiple protocol
addresses in the specified order until the destination
has been reached. This parameter can be embedded under
the description, description_list or
address_list parameter. The default setting is OFF.
SDU and TDU tnsnames.ora parameters
The session data unit (SDU)
and transport date unit (TDU) parameters are located in the
tnsnames.ora and listener.ora files. In the
tnsnames.ora, SDU specifies the size of the packets
to send over the network. Ideally, SDU should not surpass
the size of the maximum transmission unit (MTU). MTU is a
fixed value that depends on the actual network
implementation used. Oracle recommends that SDU be set equal
to MTU.
The TDU tnsnames parameter is the default
packet size used in the tnsnames.ora file 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 and TDU tnsnames parameters
for the tnsnames.ora:
The SDU and TDU settings
are a direct function of the connection speed between the
hosts. For fast T1 lines, set SDU=TDU=MTU. For slower modem
lines, experiment with smaller values of SDU and TDU.