Local Naming Parameters

Tnsnames.ora file Check ordering:

  1. 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.
  2. If the TNS_ADMIN environment variable is not set, then Oracle Net checks the ORACLE_HOME/network/admin directory.

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.

General Syntax of tnsnames.ora

net_service_name=

 (DESCRIPTION=

   (ADDRESS=(protocol_address_information))

   (CONNECT_DATA=

     (SERVICE_NAME=service_name)))

Multiple Descriptions in tnsnames.ora

net_service_name=

 (DESCRIPTION_LIST=

  (DESCRIPTION=

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)))

  (DESCRIPTION=

   (ADDRESS=(PROTOCOL=tcp)(HOST=hr1-svr)(PORT=1521))

   (ADDRESS=(PROTOCOL=tcp)(HOST=hr2-svr)(PORT=1521)))

   (CONNECT_DATA=

     (SERVICE_NAME=hr.us.example.com))))

Note: Oracle Net Manager does not support the creation of multiple connect descriptors for a net service name when using Oracle Connection Manager.

Multiple Address Lists in tnsnames.ora

net_service_name=

 (DESCRIPTION=

  (ADDRESS_LIST=

   (LOAD_BALANCE=on)

   (FAILOVER=off)

   (ADDRESS=(protocol_address_information))

   (ADDRESS=(protocol_address_information)))

  (ADDRESS_LIST=

   (LOAD_BALANCE=off)

   (FAILOVER=on)

   (ADDRESS=(protocol_address_information))

   (ADDRESS=(protocol_address_information)))

  (CONNECT_DATA=

   (SERVICE_NAME=service_name)))

Note: Oracle Net Manager supports only the creation of one protocol address list for a connect descriptor.

Connect-Time Failover and Client Load Balancing with Oracle Connection Managers(CM)

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.

sample1=

 (DESCRIPTION=

   (SOURCE_ROUTE=yes)

   (ADDRESS_LIST=

     (ADDRESS=(PROTOCOL=tcp)(HOST=host1)(PORT=1630))    # 1

     (ADDRESS_LIST=  

       (FAILOVER=on)

       (LOAD_BALANCE=off)                               #  2

       (ADDRESS=(PROTOCOL=tcp)(HOST=host2a)(PORT=1630))

       (ADDRESS=(PROTOCOL=tcp)(HOST=host2b)(PORT=1630)))

     (ADDRESS=(PROTOCOL=tcp)(HOST=host3)(PORT=1521)))    #  3

   (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))

  1. The client is instructed to connect to the protocol address of the first Oracle Connection Manager, as indicated by:

(ADDRESS=(PROTOCOL=tcp)(HOST=host1)(PORT=1630))

  1. 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:

(ADDRESS_LIST=  

  (FAILOVER=on)

  (LOAD_BALANCE=off)

  (ADDRESS=(PROTOCOL=tcp)(HOST=host2a)(PORT=1630))

  (ADDRESS=(PROTOCOL=tcp)(HOST=host2b)(PORT=1630)))

  1. Oracle Connection Manager connects to the database service using the following protocol address:

(ADDRESS=(PROTOCOL=tcp)(HOST=host3)(PORT=1521))

Example 6-5

sample2=

 (DESCRIPTION=

   (LOAD_BALANCE=on)                                    # 1

   (FAILOVER=on)

   (ADDRESS_LIST=

     (SOURCE_ROUTE=yes)

     (ADDRESS=(PROTOCOL=tcp)(HOST=host1)(PORT=1630))    # 2

     (ADDRESS=(PROTOCOL=tcp)(HOST=host2)(PORT=1521)))

  (ADDRESS_LIST=

     (SOURCE_ROUTE=yes)

     (ADDRESS=(PROTOCOL=tcp)(HOST=host3)(port=1630))

     (ADDRESS=(PROTOCOL=tcp)(HOST=host4)(port=1521)))

   (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))  # 3

  1. The client is instructed to pick an ADDRESS_LIST at random and to fail over to the other if the chosen ADDRESS_LIST fails. This is indicated by the LOAD_BALANCE and FAILOVER parameters being set to on.
  2. 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 the ADDRESS_LIST.
  3. Oracle Connection Manager then connects to the database service, using the protocol address indicated for the ADDRESS_LIST.

ADDRESS相关参数

net_service_name=

(DESCRIPTION=

 (ADDRESS=(PROTOCOL=tcp)(HOST=sales-svr)(PORT=1521))

 (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com))

  1. HTTPS_PROXY

To specify HTTP proxy host name for tunneling SSL client connections.

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. This value takes effect only when SQLNET.USE_HTTPS_PROXY=1 is set in sqlnet.ora. 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.

This parameter is applicable with Oracle Connection Manager on the server side.

HTTPS_PROXY=www-proxy.mycompany.com

  1. HTTPS_PROXY_PORT

To specify forward HTTP proxy host port for tunneling SSL client connections.

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.

HTTPS_PROXY_PORT=80

  1. ADDRESS_LIST

有多个ADDRESS时使用ADDRESS_LIST, 但ADDRESS_LIST非强制也可以不写

net_service_name=

 (DESCRIPTION=

  (ADDRESS_LIST=

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

  (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))

下以参数只用于多ADDRESS中:

  1. ENABLE

To allow the caller to detect a terminated remote server, typically it takes 2 hours or more to notice. 通常要2小时甚至更长才能发现一个远程终止的服务器。它只有一个值即broken

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

net_service_name=

 (DESCRIPTION=

  (ENABLE=broken)

  (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

  (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

  (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com))

  1. FAILOVER

To enable or disable connect-time failover for multiple protocol addresses. 默认为on

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.

要求监听不能是静态的

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.

net_service_name=

 (DESCRIPTION=

  (FAILOVER=on)

  (ADDRESS_LIST=

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

  (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))

  1. LOAD_BALANCE

To enable or disable client load balancing for multiple protocol addresses. 默认为on

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 offno, or false, Oracle Net tries the protocol addresses sequentially until one succeeds.

Example

net_service_name=

 (DESCRIPTION=

  (LOAD_BALANCE=on)

  (ADDRESS_LIST=

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

  (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com))

  1. RECV_BUF_SIZE

To specify, in bytes, the buffer space for receive operations of sessions.

This parameter is supported by the TCP/IP, TCP/IP with SSL, and SDP protocols.

Setting this parameter in the connect descriptor for a client overrides the RECV_BUF_SIZE parameter at the client-side sqlnet.ora file.

The default value for this parameter is specific to the operating system. The default for the Linux 2.6 operating system is 87380 bytes.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521)

        (RECV_BUF_SIZE=11784))

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)

        (RECV_BUF_SIZE=11784))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)))net_service_name=

 (DESCRIPTION=

   (RECV_BUF_SIZE=11784)

   (ADDRESS_LIST=

     (ADDRESS=(PROTOCOL=tcp)(HOST=hr1-server)(PORT=1521))

     (ADDRESS=(PROTOCOL=tcp)(HOST=hr2-server)(PORT=1521)))

   (CONNECT_DATA=

     (SERVICE_NAME=hr.us.example.com)))

  1. 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.

Setting this parameter in the connect descriptor for a client overrides the DEFAULT_SDU_SIZE parameter at client-side sqlnet.ora file.

Default: 8192 bytes (8 KB), Values:512 to 2097152 bytes.

Example

net_service_name=

 (DESCRIPTION=

  (SDU=8192)

   (ADDRESS_LIST=

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))

  (CONNECT_DATA=

    (SERVICE_NAME=sales.us.example.com))

  1. SEND_BUF_SIZE

To specify, in bytes, the buffer space for send operations of sessions.

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.

Default:The default value for this parameter is operating system specific. The default for the Linux 2.6 operating system is 16 KB.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521)

        (SEND_BUF_SIZE=11784))

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)

        (SEND_BUF_SIZE=11784)))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)))net_service_name=

 (DESCRIPTION=

   (SEND_BUF_SIZE=11784)

   (ADDRESS_LIST=

     (ADDRESS=(PROTOCOL=tcp)(HOST=hr1-server)(PORT=1521)

     (ADDRESS=(PROTOCOL=tcp)(HOST=hr2-server)(PORT=1521)))

   (CONNECT_DATA=

     (SERVICE_NAME=hr.us.example.com)))

  1. SOURCE_ROUTE

To enable routing through multiple protocol addresses.

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.

Default: off

net_service_name=

 (DESCRIPTION=

  (SOURCE_ROUTE=on)

  (ADDRESS=(PROTOCOL=tcp)(HOST=cman-pc)(PORT=1630))

  (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

  (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com))

  1. TYPE_OF_SERVICE

To specify the type of service to use for an Oracle Rdb database.

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.

net_service_name=

 (DESCRIPTION_LIST=

  (DESCRIPTION=

   (ADDRESS=...)

   (CONNECT_DATA=

    (SERVICE_NAME=generic)

    (RDB_DATABASE=[.mf]mf_personal.rdb)

    (GLOBAL_NAME=alpha5))

   (TYPE_OF_SERVICE=rdb_database))

  (DESCRIPTION=

   (ADDRESS=...)

   (CONNECT_DATA=

    (SERVICE_NAME=sales.us.example.com))

   (TYPE_OF_SERVICE=oracle11_database)))

Connection Data Section

CONNECT_DATA permits the following additional parameters:

net_service_name=

 (DESCRIPTION=

  (ADDRESS_LIST=

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

  (CONNECT_DATA=

    (SERVICE_NAME=sales.us.example.com)))

  1. SHARDING_KEY

To route the database request to a particular shard.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)

     ((SHARDING_KEY=40598230))))

  1. SUPER_SHARDING_KEY

To route the database request to a collection of shards.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)

     ((SHARDING_KEY=40598230)(SUPER_SHARDING_KEY=gold)))

  1. FAILOVER_MODE

To instruct Oracle Net to fail over to a different listener if the first listener fails during run time.

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 FAILOVERparameter.

FAILOVER_MODE supports the following parameters:

  1. BACKUP: Specifies the failover node by its net service name. A separate net service name must be created for the failover node.
  2. 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.

  1. 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 the COMMIT_OUTCOME=TRUE parameter.

RETRIES: Specifies the number of times to attempt to connect after a failover. If DELAY is specified, then RETRIES defaults to five retry attempts.

DELAY: Specifies the amount of time in seconds to wait between connect attempts. If RETRIES is specified, then DELAY defaults to one second.

Note: If a callback function is registered, then RETRIES and DELAY parameters are ignored.

  1. GLOBAL_NAME

To identify the Oracle Rdb database.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

    (ADDRESS=...)

    (ADDRESS=...))

   (CONNECT_DATA=

    (SERVICE_NAME=generic)

    (RDB_DATABASE=[.mf]mf_personal.rdb)

    (GLOBAL_NAME=alpha5)))

  1. HS

To direct Oracle Net to connect to a non-Oracle system through Heterogeneous Services.

只能设置为ok

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

    (SID=sales6)

    )

(HS=ok))

  1. INSTANCE_NAME

To identify the database instance to access. Set the value to the value specified by the INSTANCE_NAME parameter in the initialization parameter file.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)

     (INSTANCE_NAME=sales1)))

  1. RDB_DATABASE

To specify the file name of an Oracle Rdb database.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)

     (RDB_DATABASE= [.mf]mf_personal.rdb)))

  1. SERVER

To direct the listener to connect the client to a specific type of service handler.

Values

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.

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.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

    (SERVICE_NAME=sales.us.example.com)

    (SERVER=dedicated)))

  1. SERVICE_NAME

To identify the Oracle Database database service to access.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

     (SERVICE_NAME=sales.us.example.com)))

Security Section

1. SECURITY

To enable secure connections. Put this parameter under the DESCRIPTION parameter.

SECURITY permits the SSL_SERVER_CERT_DN parameter.

net_service_name=

 (DESCRIPTION=

  (ADDRESS_LIST=

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

    (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

  (CONNECT_DATA=

    (SERVICE_NAME=sales.us.example.com))

    (SECURITY=

      (SSL_SERVER_CERT_DN="cn=sales,cn=OracleContext,dc=us,dc=acme,dc=com")))

  1. SSL_SERVER_CERT_DN

To specify the distinguished name (DN) of the database server.

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.

net_service_name=

 (DESCRIPTION=

   (ADDRESS_LIST=

     (ADDRESS=...)

     (ADDRESS=...))

   (CONNECT_DATA=

     (SERVICE_NAME=finance.us.example.com))

   (SECURITY=

     (SSL_SERVER_CERT_DN="cn=finance,cn=OracleContext,dc=us,dc=acme,dc=com")))

Timeout Parameters

1. CONNECT_TIMEOUT

To specify the timeout duration in seconds for a client to establish an Oracle Net connection to an Oracle database.

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.

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.

net_service_name=

 (DESCRIPTION=

  (CONNECT_TIMEOUT=10)(RETRY_COUNT=3)

  (ADDRESS_LIST=

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

  (CONNECT_DATA=

   (SERVICE_NAME=sales.us.example.com)))

2. RETRY_COUNT

To specify the number of times an ADDRESS list is traversed before the connection attempt is terminated.

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.

  1. RETRY_DELAY

To specify the delay in seconds between subsequent retries for a connection. This parameter works in conjunction with RETRY_COUNT parameter.

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.

net_service_name=

(DESCRIPTION_LIST=

 (DESCRIPTION=

  (CONNECT_TIMEOUT=10)(RETRY_COUNT=3)(RETRY_DELAY=2)

  (ADDRESS_LIST=

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales1a-svr)(PORT=1521))

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales1b-svr)(PORT=1521)))

  (CONNECT_DATA=(SERVICE_NAME=sales1.example.com)))

 (DESCRIPTION=

  (CONNECT_TIMEOUT=60)(RETRY_COUNT=2)(RETRY_DELAY=1)

  (ADDRESS_LIST=

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales2a-svr)(PORT=1521))

   (ADDRESS=(PROTOCOL=tcp)(HOST=sales2b-svr)(PORT=1521)))

  (CONNECT_DATA=(SERVICE_NAME=sales2.us.example.com))))

  1. TRANSPORT_CONNECT_TIMEOUT

To specify the transportation timeout duration in seconds for a client to establish an Oracle Net connection to an Oracle database.

This parameter is put under the DESCRIPTION parameter.

The TRANSPORT_CONNECT_TIMEOUT parameter specifies the time, in seconds, for a client to establish a TCP connection to the database server. The default value is 60 seconds.

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.

net_service_name =

  (DESCRIPTION=

    (TRANSPORT_CONNECT_TIMEOUT=10)

    (ADDRESS_LIST=

      (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-svr)(PORT=1521))

      (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-svr)(PORT=1521)))

    (CONNECT_DATA=

      (SERVICE_NAME=sales.us.example.com)))

Compression Parameters

1. COMPRESSION

To enable or disable data compression.

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.

Default:off

net_service_name=

 (DESCRIPTION=

   (COMPRESSION=on)

      (ADDRESS_LIST=

         (ADDRESS= (PROTOCOL=tcp) (HOST=sales1-server) (PORT=1521))

         (ADDRESS= (PROTOCOL=tcp) (HOST=sales2-server) (PORT=1521)))

   (CONNECT_DATA=

       (SERVICE_NAME=sales.us.example.com)))

  1. COMPRESSION_LEVELS

To specify the compression level.

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.

Values: low(default)|high 

net_service_name=

 (DESCRIPTION=

  (COMPRESSION=on)

  (COMPRESSION_LEVELS=(LEVEL=low)(LEVEL=high))

   (ADDRESS_LIST=

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales1-server)(PORT=1521))

     (ADDRESS=(PROTOCOL=tcp)(HOST=sales2-server)(PORT=1521)))

  (CONNECT_DATA=

    (SERVICE_NAME=sales.us.example.com)))

你可能感兴趣的:(Oracle,oracle)