Sqlnet.ora



Sqlnet.ora is a text file that provides SQL*Net with basic configuration details like tracing options, default domain, encryption, etc. This file can be found in the ORACLE HOME\NETWORK\ADMIN directory.

SQLNET.ORA can be used for different purposes,
first to identify the method to connect from client like tnsnames
Second it can be used to bypass the network layer by setting the parameter automatic_ipc=on
Third, we can set to check the client whether its active after certain interval.
If sqlnet.ora is not there, then it will take the default values.


Sample sqlnet.ora files

Example 1:
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, HOSTNAME)
NAMES.DEFAULT_DOMAIN = WORLD
TRACE_LEVEL_CLIENT = OFF
SQLNET.EXPIRE_TIME = 30

Example 2:
automatic_ipc = ON               # Set to OFF for PC's
trace_level_client = OFF         # Set to 16 if tracing is required
sqlnet.expire_time = 0           # Idle time in minutes
sqlnet.authentication_services = (ALL)
names.directory_lookup = (TNSNAMES,ONAMES)
names.default_domain = world
name.default_zone = world

Parameters

Some of the parameters that can be set in sqlnet.ora:

names.default_domain

The value of this parameter is appended to the net service name if the net service name doesn't already have a domain.

names.directory_path

Specifies the order of naming methods that are used when a client tries to connect to a database. Possible values: TNSNAMES, LDAP, ONAMES, HOSTNAME, EZCONNECT.

sqlnet.expire_time

Enables dead connection detection, that is, after the specified time (in minutes) the server checks if the client is still connected. If not, the server process exits. This parameter must be set on the server.

trace_level_client

Enables tracing if not set to off (or 0, which is the default). Possible values: USER (4), ADMIN (10) and SUPPORT (16).

trace_file_client

Specifies the name of the (client) trace file. The default is sqlnet.trc.

trace_directory_client

Specifies the destination directory in which the trace file goes. The default is the current directory in which the executable is started.

automatic_ipc

When automatic_ipc=on, SQL*Net will bypass the network layer and make direct local connections to the database. This is useful on database servers.

bequeath_detach

The default is NO (turn signal handling on). By setting BEQUEATH_DETACH=YES, Oracle turns off its own signal handlers and pass all child processes over to the UNIX init process (pid = 1). The init process will take over responsibility to checks for "defunct" child processes and terminate them.
Instead of setting this parameter in the sqlnet.ora file, consider setting it as an environment variable before starting applications that use signal handlers that could interfere with SQL*Net. Example:
export BEQUEATH_DETACH=YES

sqlnet.outbound_connect_timeout

Time in seconds after which a connection attempt will be timed out. After timeout, the client will try to connect to the next host on the ADDRESS_LIST. This facilitates quick fail-over in case a system/node is down. This parameter should typically be set to +- 3 seconds. If not set, the client connection will block for the default TCP connect timeout duration.

tcp.connect_timeout

In 11.1 and above this parameter sets the timeout for establishing a TCP connection.

No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf...