Multiple Tnsnames Ora Filest
The tnsnames.ora file is a configuration file that contains network service name s mapped to connect descriptor s for the local naming method, or net service names mapped to listener protocol addresses. A net service name is an alias mapped to a database network address contained in a connect descriptor. A connect descriptor contains the location of the listener through a protocol address and the service name of the database to which to connect.
This chapter provides a complete listing of the tnsnames.ora
file configuration parameters. This chapter contains the following topics:
6.1 Overview of Local Naming Parameters
The tnsnames.ora
file is a configuration file that contains network service names mapped to connect descriptors for the local naming method, or net service names mapped to listener protocol addresses.
A net service name is an alias mapped to a database network address contained in a connect descriptor. A connect descriptor contains the location of the listener through a protocol address and the service name of the database to which to connect. Clients and database servers (that are clients of other database servers) use the net service name when making a connection with an application.
By default, the tnsnames.ora
file is located in the ORACLE_HOME/network/admin
directory. Oracle Net will check the other directories for the configuration file. For example, the order checking the tnsnames.ora
file is as follows:
The directory specified by the
TNS_ADMIN
environment variable. If the file is not found in the directory specified, then it is assumed that the file does not exist.If the
TNS_ADMIN
environment variable is not set, then Oracle Net checks theORACLE_HOME/network/admin
directory.
Note:
On Microsoft Windows, the TNS_ADMIN
environment variable is used if it is set in the environment of the process. If the TNS_ADMIN
environment variable is not defined in the environment, or the process is a service which does not have an environment, then Microsoft Windows scans the registry for a TNS_ADMIN
parameter.
See Also:
Oracle Database Global Data Services Concepts and Administration Guide for information about management of global services
Oracle operating system-specific documentation
6.2 General Syntax of tnsnames.ora
The basic syntax for a tnsnames.ora
file is shown in Example 6-1.
In the preceding example, DESCRIPTION
contains the connect descriptor, ADDRESS
contains the protocol address, and CONNECT_DATA
contains the database service identification information.
Zoo empire kostenlos downloaden vollversion deutsche. Dec 03, 2017 Zoo Empire Kostenlos Downloaden Vollversion Deutsche. 3/12/2017 0 Comments Farmspiele kostenlos downloaden. Farmerama oder Kapi Farm - die Browsergames erfordern nur eine schnelle Registrierung und schon k Http:// gerne Zootycoon 2 downloaden, auf deutsch und die Vollversion. Empire: Four Kingdoms. Halten Sie die herabfallenden.
6.3 Multiple Descriptions in tnsnames.ora
A tnsnames.ora
file can contain net service names with one or more connect descriptors. Each connect descriptor can contain one or more protocol addresses. Example 6-2 shows two connect descriptors with multiple addresses. DESCRIPTION_LIST
defines a list of connect descriptors.
Example 6-2 Net Service Name with Multiple Connect Descriptors in tnsnames.ora
Note:
Oracle Net Manager does not support the creation of multiple connect descriptors for a net service name when using Oracle Connection Manager.
6.4 Multiple Address Lists in tnsnames.ora
The tnsnames.ora
file also supports connect descriptors with multiple lists of addresses, each with its own characteristics. In Example 6-3, two address lists are presented. The first address list features client load balancing and no connect-time failover, affecting only those protocol addresses within its ADDRESS_LIST
. The second protocol address list features no client load loading balancing, but does have connect-time failover, affecting only those protocol addresses within its ADDRESS_LIST
. The client first tries the first or second protocol address at random, then tries protocol addresses three and four sequentially.
Example 6-3 Multiple Address Lists in tnsnames.ora
Note:
Oracle Net Manager supports only the creation of one protocol address list for a connect descriptor.
Oracle Net Services supports the IFILE parameter in the
tnsnames.ora
file, with up to three levels of nesting. The parameter is added manually to the file. The following is an example of the syntax:Refer to Oracle Database Reference for additional information.
6.5 Connect-Time Failover and Client Load Balancing with Oracle Connection Managers
When a connect descriptor in a tnsnames.ora
file contains at least two protocol addresses for Oracle Connection Manager, parameters for connect-time failover and load balancing can be included in the file.
Example 6-4 illustrates failover of multiple Oracle Connection Manager protocol addresses.
Example 6-4 Multiple Oracle Connection Manager Addresses in tnsnames.ora
In Example 6-4, the syntax does the following:
The client is instructed to connect to the protocol address of the first Oracle Connection Manager, as indicated by:
The first Oracle Connection Manager is instructed to connect to the first protocol address of another Oracle Connection Manager. If the first protocol address fails, then it tries the second protocol address. This sequence is specified with the following configuration:
Oracle Connection Manager connects to the database service using the following protocol address:
Example 6-5 illustrates client load balancing among two Oracle Connection Managers and two protocol addresses:
In Example 6-5, the syntax does the following:
The client is instructed to pick an
ADDRESS_LIST
at random and to fail over to the other if the chosenADDRESS_LIST
fails. This is indicated by theLOAD_BALANCE
andFAILOVER
parameters being set toon
.When an
ADDRESS_LIST
is chosen, the client first connects to Oracle Connection Manager, using the Oracle Connection Manager protocol address that uses port 1630 indicated for theADDRESS_LIST
.Oracle Connection Manager then connects to the database service, using the protocol address indicated for the
ADDRESS_LIST
.
6.6 Connect Descriptor Descriptions
Each connect descriptor is contained within the DESCRIPTION parameter. Multiple connect descriptors are characterized by the DESCRIPTION_LIST parameter. These parameters are described in this section.
6.6.1 DESCRIPTION
To specify a container for a connect descriptor.
Usage Notes
When using more than one DESCRIPTION
parameter, put the parameters under the DESCRIPTION_LIST
parameter.
6.6.2 DESCRIPTION_LIST
To define a list of connect descriptors for a particular net service name.
Example
6.7 Protocol Address Section
The protocol address section of the tnsnames.ora
file specifies the protocol addresses of the listener. If there is only one listener protocol address, then use the ADDRESS parameter. If there is more than one address, then use the ADDRESS_LIST parameter.
6.7.1 ADDRESS
To define a single listener protocol address.
Usage Notes
Put this parameter under either the ADDRESS_LIST
parameter or the DESCRIPTION
parameter.
See Also:
Protocol Address Configuration for descriptions of the correct parameters to use for each protocol
6.7.1.1 HTTPS_PROXY
Purpose
To specify HTTP proxy host name for tunneling SSL client connections.
Usage Notes
The clients can tunnel secure connections over forward HTTP proxy using HTTP CONNECT method. This helps in accessing the public cloud database service as it eliminates the requirement to open an outbound port on a client side firewall. This parameter is applicable only to the connect descriptors where PROTOCOL=TCPS
. This is similar to the web browser setting for intranet users who want to connect to internet hosts. Increase the forward web proxy read timeout for requests to a higher value depending on client queries. Otherwise, the forward web proxy closes the connection assuming that no requests are made from the client.
Successful connection depends on specific proxy configurations. The performance of data transfers depends on proxy capacity. Oracle recommends not to use this feature in production environments where performance is critical.
Configuring tnsnames.ora
for the HTTP proxy may not be enough depending your organization’s network configuration and security policies. For example, some networks require a username and password for the HTTP proxy.
Oracle Client versions earlier than 18c does not support connections through HTTP proxy.
Contact your network administrator to open outbound connections to hosts in the oraclecloud.com
domain using the relevant port, without going through an HTTP proxy. For example, port 1522.
Values
HTTP proxy host name that can make an outbound connection to the internet hosts.
6.7.1.2 HTTPS_PROXY_PORT
Purpose
To specify forward HTTP proxy host port for tunneling SSL client connections.
Usage Notes
It forwards the HTTP proxy host port that receives HTTP CONNECT method. This parameter should be used along with HTTPS_PROXY_PORT
. This value takes effect only when SQLNET.USE_HTTPS_PROXY=1
is set in sqlnet.ora
.
Values
port number
6.7.2 ADDRESS_LIST
To define a list of protocol addresses.
Usage Notes
If there is only one listener protocol address, then ADDRESS_LIST
is not necessary.
Put this parameter under either the DESCRIPTION
parameter or the DESCRIPTION_LIST
parameter.
6.8 Optional Parameters for Address Lists
For multiple addresses, the following parameters are available:
6.8.1 ENABLE
To allow the caller to detect a terminated remote server, typically it takes 2 hours or more to notice.
Usage Notes
The keepalive feature on the supported TCP transports can be enabled for a net service client by putting (ENABLE=broken)
under the DESCRIPTION
parameter in the connect string. On the client side, the default for tcp_keepalive
is off
. Operating system TCP configurables, which vary by platform, define the actual keepalive timing details.
Example
Although the preceding example has multiple addresses, the ADDRESS_LIST
parameter was not used. This is because the ADDRESS_LIST
parameter is not mandatory.
6.8.2 FAILOVER
To enable or disable connect-time failover for multiple protocol addresses.
Usage Notes
When you set the parameter to on
, yes
, or true
, Oracle Net fails over at connect time to a different address if the first protocol address fails. When you set the parameter to off
, no
, or false
, Oracle Net tries one protocol address.
Put this parameter under the DESCRIPTION_LIST
parameter, the DESCRIPTION
parameter, or the ADDRESS_LIST
parameter.
Note:
Do not set the GLOBAL_DBNAME
parameter in the SID_LIST_
listener_name
section of the listener.ora
. A statically configured global database name disables connect-time failover.
on
for the DESCRIPTION_LIST
, DESCRIPTION
, and ADDRESS_LIST
parameters
Values
yes
on
true
no
off
false
6.8.3 LOAD_BALANCE
To enable or disable client load balancing for multiple protocol addresses.
Usage Notes
When you set the parameter to on
, yes
, or true
, Oracle Net goes through the list of addresses in a random sequence, balancing the load on the various listener or Oracle Connection Manager protocol addresses. When you set the parameter to off
, no
, or false
, Oracle Net tries the protocol addresses sequentially until one succeeds.
Put this parameter under the DESCRIPTION_LIST
parameter, the DESCRIPTION
parameter, or the ADDRESS_LIST
parameter.
on
for DESCRIPTION_LIST
Values
yes
on
true
no
off
false
6.8.4 RECV_BUF_SIZE
To specify, in bytes, the buffer space for receive operations of sessions.
Usage Notes
This parameter is supported by the TCP/IP, TCP/IP with SSL, and SDP protocols.
Put this parameter under the DESCRIPTION
parameter or at the end of the protocol address.
Setting this parameter in the connect descriptor for a client overrides the RECV_BUF_SIZE parameter at the client-side sqlnet.ora
file.
Note:
Additional protocols might support this parameter on certain operating systems. Refer to the operating system-specific documentation for additional information about additional protocols.
The default value for this parameter is specific to the operating system. The default for the Linux 2.6 operating system is 87380 bytes.
Example
See Also:
Oracle Database Net Services Administrator's Guide for additional information about configuring this parameter
6.8.5 SDU
To instruct Oracle Net to optimize the transfer rate of data packets being sent across the network with a specified session data unit (SDU) size.
Usage Notes
Put this parameter under the DESCRIPTION
parameter.
Setting this parameter in the connect descriptor for a client overrides the DEFAULT_SDU_SIZE parameter at client-side sqlnet.ora
file.
8192 bytes (8 KB)
Values
512 to 2097152 bytes.
See Also:
Oracle Database Net Services Administrator's Guide for complete SDU usage and configuration information
6.8.6 SEND_BUF_SIZE
To specify, in bytes, the buffer space for send operations of sessions.
Usage Notes
This parameter is supported by the TCP/IP, TCP/IP with SSL, and SDP protocols.
Put this parameter under the DESCRIPTION
parameter or at the end of the protocol address.
Setting this parameter in the connect descriptor for a client overrides the SEND_BUF_SIZE parameter at the client-side sqlnet.ora
file.
Note:
Additional protocols might support this parameter on certain operating systems. Refer to the operating system-specific documentation for information about additional protocols.
The default value for this parameter is operating system specific. The default for the Linux 2.6 operating system is 16 KB.
Example
See Also:
Oracle Database Net Services Administrator's Guide for additional information about configuring this parameter
6.8.7 SOURCE_ROUTE
To enable routing through multiple protocol addresses.
Usage Notes
When you set this parameter to on
or yes
, Oracle Net uses each address in order until the destination is reached.
To use Oracle Connection Manager, an initial connection from the client to Oracle Connection Manager is required, and a second connection from Oracle Connection Manager to the listener is required.
Put this parameter under either the DESCRIPTION_LIST
parameter, the DESCRIPTION
parameter, or the ADDRESS_LIST
parameter.
off
Values
yes
on
no
off
See Also:
Oracle Database Net Services Administrator's Guide for complete configuration information
6.8.8 TYPE_OF_SERVICE
To specify the type of service to use for an Oracle Rdb database.
Usage Notes
This parameter should only be used if the application supports both an Oracle Rdb and Oracle database service, and you want the application to load balance between the two.
Put this parameter under the DESCRIPTION
parameter.
6.9 Connection Data Section
The connection data section of the tnsnames.ora
file specifies the name of the destination service. The following parameters are available:
6.9.1 CONNECT_DATA
To define the service to which to connect, such as SERVICE_NAME
.
Usage Notes
Put this parameter under the DESCRIPTION
parameter.
CONNECT_DATA
permits the following additional parameters:
6.9.1.1 SHARDING_KEY
Purpose
To route the database request to a particular shard.
Usage Notes
Put this parameter under the CONNECT_DATA
parameter.
Example
See Also:
Oracle Database Net Services Administrator's Guide for additional information about the use of the SHARDING_KEY
parameter
6.9.1.2 SUPER_SHARDING_KEY
Purpose
To route the database request to a collection of shards.
Usage Notes
Put this parameter under the CONNECT_DATA
parameter.
Example
See Also:
Oracle Database Net Services Administrator's Guide for additional information about the use of the SUPER_SHARDING_KEY
parameter
6.9.2 FAILOVER_MODE
To instruct Oracle Net to fail over to a different listener if the first listener fails during run time.
Usage Notes
Depending upon the configuration, the session or any SELECT
statements which were in progress are automatically failed over.
This type of failover is called Transparent Application Failover (TAF) and should not be confused with the connect-time failover FAILOVER parameter.
Put this parameter under the CONNECT_DATA
parameter.
FAILOVER_MODE
supports the following parameters:
BACKUP
: Specifies the failover node by its net service name. A separate net service name must be created for the failover node.TYPE
: Specifies the type of failover. Three types of Oracle Net failover functionality are available by default to Oracle Call Interface (OCI) applications:SESSION
: Fails over the session. For example, if a user's connection is lost, then a new session is automatically created for the user on the backup. This type of failover does not attempt to recover selects.SELECT
: Allows users with open cursors to continue fetching them after failure. However, this mode involves overhead on the client side in normal select operations.NONE
: This is the default, in which no failover functionality is used. This can also be explicitly specified to prevent failover from happening.
METHOD
: Specifies how fast failover is to occur from the primary node to the backup node:BASIC
: Establishes connections at failover time. This option requires almost no work on the backup database server until failover time.PRECONNECT
: Pre-establishes connections. This provides faster failover but requires that the backup instance be able to support all connections from every supported instance.
TRANSACTION
: Allows the database to complete the current database transaction following a recoverable error. This parameter is used with theCOMMIT_OUTCOME=TRUE
parameter.RETRIES
: Specifies the number of times to attempt to connect after a failover. IfDELAY
is specified, thenRETRIES
defaults to five retry attempts.DELAY
: Specifies the amount of time in seconds to wait between connect attempts. IfRETRIES
is specified, thenDELAY
defaults to one second.
Note:
If a callback function is registered, then RETRIES
and DELAY
parameters are ignored.
See Also:
Oracle Database Net Services Administrator's Guide for additional configuration information
6.9.3 GLOBAL_NAME
To identify the Oracle Rdb database.
Usage Notes
Put this parameter under the CONNECT_DATA
parameter.
6.9.4 HS
To direct Oracle Net to connect to a non-Oracle system through Heterogeneous Services.
Usage Notes
Put this parameter under the CONNECT_DATA
parameter.
None
Values
See Also:
Oracle Database Net Services Administrator's Guide for complete configuration information
6.9.5 INSTANCE_NAME
To identify the database instance to access.
Usage Notes
Set the value to the value specified by the INSTANCE_NAME
parameter in the initialization parameter file.
Put this parameter under the CONNECT_DATA
parameter.
See Also:
Oracle Database Net Services Administrator's Guide for additional information about the use of INSTANCE_NAME
6.9.6 RDB_DATABASE
To specify the file name of an Oracle Rdb database.
Usage Notes
Put this parameter under the CONNECT_DATA
parameter.
6.9.7 SERVER
To direct the listener to connect the client to a specific type of service handler.
Usage Notes
Put this parameter under the CONNECT_DATA
parameter.
dedicated
to specify whether client requests be served by dedicated server.shared
to specify whether client requests be served by a dispatcher or shared server.pooled
to get a connection from the connection pool if database resident connection pooling is enabled on the server.
Note:
Shared server must be configured in the database initialization file in order for the client to connect to the database with a shared server process.
The USE_DEDICATED_SERVER parameter in the
sqlnet.ora
file overrides this parameter.
6.9.8 SERVICE_NAME
To identify the Oracle Database database service to access.
Usage Notes
Set the value to a value specified by the SERVICE_NAMES
parameter in the initialization parameter file.
Put this parameter under the CONNECT_DATA
parameter.
See Also:
Oracle Database Net Services Administrator's Guide for additional information about the use of the SERVICE_NAME
parameter
6.10 Security Section
The security section of the tnsnames.or
a file specifies the following security-related parameters for use with Oracle security features:
6.10.1 SECURITY
To change the security properties of the connection. Put this parameter under the DESCRIPTION
parameter.
Usage Notes
The parameters permitted under SECURITY
are SSL_SERVER_CERT_DN and AUTHENTICATION_SERVICE.
6.10.2 SSL_SERVER_CERT_DN
To specify the distinguished name (DN) of the database server.
Usage Notes
The client uses this information to obtain the list of DNs it expects for each of the servers, enforcing the database server DN to match its service name.
Use this parameter with the sqlnet.ora
parameter SSL_SERVER_DN_MATCH to enable server DN matching.
See Also:
6.11 Timeout Parameters
/? 25800-1 IPv6?/
The timeout section of the tnsnames.or
a file provides the ability to specify timeout and retry configuration through the TNS connect string. The following parameters can be set at the DESCRIPTION
level of a connect string:
6.11.1 CONNECT_TIMEOUT
To specify the timeout duration in ms
, sec
, or min
for a client to establish an Oracle Net connection to an Oracle database.
Usage Notes
Put this parameter under the DESCRIPTION
parameter.
The timeout interval specified by CONNECT_TIMEOUT
is a superset of the TCP connect timeout interval. It includes the time to be connected to the database instance providing the requested service, not just the duration of the TCP connection. It accepts different timeouts with or without space between the value and the unit. In case, no unit is mentioned, the default unit is sec
.
The timeout interval is applicable for each ADDRESS
in an ADDRESS_LIST
, and each IP address to which a host name is mapped.
The CONNECT_TIMEOUT
parameter is equivalent to the sqlnet.ora
parameter SQLNET.OUTBOUND_CONNECT_TIMEOUT, and overrides it.
6.11.2 RETRY_COUNT
To specify the number of times an ADDRESS
list is traversed before the connection attempt is terminated.
Usage Notes
Put this parameter under the DESCRIPTION
parameter.
When a DESCRIPTION_LIST
is specified, each DESCRIPTION
is traversed multiple times based on the specified number of retries.
6.11.3 RETRY_DELAY
To specify the delay in seconds between subsequent retries for a connection. This parameter works in conjunction with RETRY_COUNT
parameter.
Usage Notes
Put this parameter under the DESCRIPTION
parameter.
When a DESCRIPTION_LIST
is specified, each DESCRIPTION
is traversed multiple times based on the specified number of retries, and the specific delay for the description.
Tnsnames Ora File Location
6.11.4 TRANSPORT_CONNECT_TIMEOUT
To specify the transport connect timeout duration in ms
, sec
, or min
for a client to establish an Oracle Net connection to an Oracle database.
Usage Notes
This parameter is put under the DESCRIPTION
parameter.
The TRANSPORT_CONNECT_TIMEOUT
parameter specifies the time, in ms
, sec
, or min
, for a client to establish a TCP connection to the database server. It accepts different timeouts with or without space between the value and the unit. The default value is 60 seconds
. In case, no unit is mentioned, the default unit is sec
.
The timeout interval is applicable for each ADDRESS
in an ADDRESS_LIST
description, and each IP address that a host name is mapped. The TRANSPORT_CONNECT_TIMEOUT
parameter is equivalent to the sqlnet.ora
parameter TCP.CONNECT_TIMEOUT, and overrides it.
6.12 Compression Parameters
The compression section of the tnsnames.ora
file provides the ability to enable compression and specify compression levels. The following parameters can be set at the DESCRIPTION
level of a connect string:
6.12.1 COMPRESSION
To enable or disable data compression.
Usage Notes
Put this parameter under the DESCRIPTION
parameter.
Setting this parameter in the connect descriptor for a client overrides the SQLNET.COMPRESSION parameter in the client-side sqlnet.ora
file.
off
Values
on
to enable data compression.off
to disable data compression.
6.12.2 COMPRESSION_LEVELS
To specify the compression level.
Usage Notes
The compression levels are used at the time of negotiation to verify which levels are used at both ends, and select one level. Put this parameter under the DESCRIPTION
parameter.
This parameter is used with the COMPRESSION
parameter. Setting this parameter in the connect descriptor for a client overrides the SQLNET.COMPRESSION_LEVELS parameter in the client-side sqlnet.ora
file.
low
Values
low
for low CPU usage and a low compression ratio.high
for high CPU usage and a high compression ratio.