| Lesson 3 | Oracle Network Services and Net components |
| Objective | Define the components of Oracle network tools. |
Oracle Net Services provides the connectivity between an application and an Oracle database service. To understand its components, separate three things: the software that establishes a connection, the configuration that describes that connection, and the tools used to administer or test it. A configuration file does not listen for connections, and a successful network test does not prove that a database user can run a query.
In Oracle AI Database 26ai, the core connection path still involves a client, an Oracle Net listener, and a database service handler. Naming methods translate a connection identifier into connection details. Configuration files can supply those details and establish security or diagnostic policies. Database links extend this model when one database session accesses another database through SQL.
This lesson uses a simple example: a reporting application needs the Raleigh database service. The host, service, account, and database-link names below are illustrative. They represent different objects and should not be treated as interchangeable names for the same component.
tnsnames.ora. Easy Connect puts connection details directly in the connection string. Directory naming can provide centrally managed resolution.listener.ora file.A dedicated-server connection and a shared-server connection need not use the same handoff mechanism. Avoid the blanket statement that the listener always creates a new process or carries every subsequent SQL result. The listener's principal role is connection establishment; the selected server architecture determines how the session is serviced.
| File | Purpose | Important distinction |
|---|---|---|
tnsnames.ora | Maps local net service names to connect descriptors. | Optional when another supported naming method supplies the destination. |
listener.ora | Configures listener endpoints and listener-specific behavior. | The listener process accepts requests; the file supplies configuration. |
sqlnet.ora | Defines Oracle Net profile settings for the client or server that reads it. | Settings have documented scope and defaults; they are not automatically effective on every host. |
protocol.ora | A legacy filename encountered in older Oracle networking material. | Do not create it as the standard home for the current TCP parameters discussed here. |
The familiar Oracle home network/admin directory is not the only possible configuration location. TNS_ADMIN, read-only Oracle homes, platform conventions, and service environments can affect which files are used. Before editing, establish the actual client or listener executable, its Oracle home, and its effective configuration directory. Editing a similarly named file in an unused installation will not fix the active connection.
Also distinguish the client machine from the database server. A workstation's naming configuration affects connections initiated there. When the database itself makes an outgoing connection through a database link, the originating database environment becomes the client for that connection. Copying an alias only to a workstation does not make it available to that database process.
A local naming entry can give an endpoint a convenient application-facing alias. This example defines RAL in the appropriate tnsnames.ora:
RAL =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = raleigh-db.example.com)
(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = salespdb.example.com)))
Here, RAL is a net service name, raleigh-db.example.com is a host name, and salespdb.example.com identifies the requested database service. The host name is resolved through the operating system's configured mechanisms, commonly DNS and possibly a hosts file. The service name tells the listener which service the client wants; it is not a substitute for the host address.
From an operating-system terminal, an Oracle client configured for local naming could connect with:
sqlplus report_user@RAL
SQL*Plus prompts for the password. An Easy Connect alternative supplies the host, port, and service directly:
sqlplus report_user@//raleigh-db.example.com:1521/salespdb.example.com
That alternative does not require a RAL entry in tnsnames.ora. It still requires a usable network path, a registered or otherwise configured service, and valid authentication. Naming convenience does not replace those requirements. These examples illustrate TCP addressing, not a complete encrypted production connection configuration.
A listener knows where to accept requests and which services it can handle. Oracle supports a default listener configuration, so it is inaccurate to say every server must have a manually created listener.ora. A default listener can start on TCP port 1521 and learn services through dynamic registration. Custom endpoints and other requirements may need explicit configuration.
The database's Listener Registration process, LREG, registers service information with listeners. Dynamic registration is separate from maintaining a client alias: adding RAL to tnsnames.ora does not register salespdb.example.com with a listener. Likewise, registering a service does not automatically distribute a naming alias to every client.
This distinction helps explain a common diagnostic result: the network reaches the listener, but the requested service is unknown. Check the service spelling, database and PDB state, and registration configuration before changing unrelated client timeout settings. In installations managed by Grid Infrastructure, use the management procedures appropriate to that environment rather than treating every listener as a standalone process.
The profile file sqlnet.ora can govern naming resolution, authentication, encryption negotiation, timeouts, and diagnostics. Read each parameter's client/server scope before applying it. A server-side setting and a client-side setting with related names may control different stages of a connection.
NAMES.DIRECTORY_PATH specifies the order of configured naming methods, such as TNSNAMES and EZCONNECT.SQLNET.AUTHENTICATION_SERVICES selects supported authentication services. Platform-specific values should not be copied indiscriminately between operating systems.SQLNET.ENCRYPTION_CLIENT and SQLNET.ENCRYPTION_SERVER express native network encryption negotiation policies. They are not simple switches that configure TLS.TCP.CONNECT_TIMEOUT concerns establishing the client's TCP connection. It is not a SQL execution timeout.SQLNET.INBOUND_CONNECT_TIMEOUT limits server-side connection establishment and authentication time. The listener's separate INBOUND_CONNECT_TIMEOUT_listener_name belongs to listener configuration.SEND_BUF_SIZE and RECV_BUF_SIZE are the documented buffer parameter names. Do not invent TCP.SEND_BUF_SIZE or TCP.RECV_BUF_SIZE.TCP.NODELAY[1] controls Nagle-related TCP behavior. Oracle 26ai documents YES as the default.Older descriptions that put these parameters in protocol.ora should not be used as an Oracle 26ai configuration recipe. Consult the current sqlnet.ora reference, identify the process reading the profile, and change only a parameter connected to a demonstrated requirement. Increasing timeouts or buffers without identifying the bottleneck can hide symptoms while adding operational complexity.
For diagnostics, Automatic Diagnostic Repository (ADR) support is enabled by default. Parameters for traditional non-ADR logging do not necessarily control ADR output: for example, LOG_DIRECTORY_CLIENT is not effective when client ADR diagnostics are enabled. TRACE_LEVEL_CLIENT controls tracing, but selecting a trace level and locating the resulting files are separate tasks. Record the diagnostic mode before interpreting a directory setting.
Oracle Net Configuration Assistant (NetCA) guides initial network configuration, including listeners and naming configuration. Oracle Net Manager provides an interface for reviewing and maintaining supported network configuration. These tools help produce settings; they do not remove the need to understand which Oracle home and configuration location are active.
Listener Control (lsnrctl) inspects and administers listeners. The following operating-system commands request information without stopping the listener:
lsnrctl status
lsnrctl services
Use an explicit listener name when the target is not the default listener. Status information helps identify the listener and its endpoints; service information shows registered services and handlers. Run the appropriate installed utility in the correct environment. A local command directed at the wrong listener can be technically successful while answering the wrong question.
TNSPING helps test resolution and listener reachability for an Oracle Net connect identifier:
tnsping RAL
A successful response does not prove that the database is open, that the password is valid, or that the user can select a table. Follow it with an actual database login when authorized. SQL*Plus provides that session-level test. Oracle Enterprise Manager can add centralized administration where deployed, but it is not a prerequisite for an ordinary client connection.
An application that logs directly into the Raleigh service does not need a database link merely because the server is remote. A link is useful when a session connected to one database needs SQL access to objects in another database. In that case, the originating database initiates a second connection.
The following is an illustrative private, fixed-user link. Creating it requires the appropriate privilege; the remote account also needs access to the intended remote objects. The password is a placeholder, not a credential to reuse:
CREATE DATABASE LINK RALEIGH
CONNECT TO RALEIGH_USER
IDENTIFIED BY "ReplaceWithActualSecret"
USING 'RAL';
RALEIGH names the database link used in SQL. RALEIGH_USER identifies the remote database account. RAL is the connection identifier resolved by the originating database environment. Fixed-user links specify remote credentials; other link authentication models differ, so not every database link should be described as storing a remote username and password.
Unlike the terminal commands above, CREATE DATABASE LINK is SQL and is shown with a terminating semicolon for SQL*Plus. An example query using the link is:
SELECT customer_id, customer_name
FROM customer@RALEIGH
ORDER BY customer_name;
The example assumes that the remote account can resolve and select customer with those columns. A different owner may require an explicit schema qualifier. This lesson explains the connection sequence; it does not establish an account, grant privileges, or execute the statements.
RALEIGH link in the current SQL context.RAL to the remote endpoint and service, using the configured naming method.If GLOBAL_NAMES is TRUE, database-link naming must conform to the remote database's global name. The short name RALEIGH is therefore conditional, not universally valid. Inspect the effective setting and database identity before choosing a link name. Do not assume every installation is configured by manually editing an initsid.ora file; server parameter files and managed configuration are common.
Distributed SQL does not guarantee that almost all processing, or every sort, occurs remotely. The optimizer's distributed execution plan determines where work is performed. Remote filtering can reduce transferred rows, while joins, sorting, and other operations may involve either site. Investigate the actual execution plan and resource use before attributing a slow query to the remote TEMP tablespace.
Start with the exact failed connection string and the environment that issued it. Then check naming resolution, endpoint reachability, listener service visibility, authentication, and object privileges in that order. Keep the observed error with each test. A naming failure, an unavailable listener, an unknown service, and a rejected login represent different stages and need different remedies.
For a database-link problem, repeat this reasoning from the originating database host and configuration, rather than relying only on a successful workstation connection. Compare the service requested by the link with the service that worked interactively. Once connectivity is established, investigate query execution separately. This prevents configuration experiments from obscuring a straightforward account or SQL problem.
Suppose a developer can connect using Easy Connect but cannot connect using RAL from the same SQL*Plus installation. That comparison is useful evidence: the working connection establishes that the tested endpoint and credentials can support a session. Compare the alias's host, port, and service with the working string, then inspect the effective naming configuration. Rebuilding the listener would be a poor first response to an alias that resolves incorrectly.
Now suppose the developer can use RAL, but customer@RALEIGH fails in a session on a different database. These are different connection origins. The workstation's successful test does not validate the originating database server's naming files, network access, or link credentials. Follow the second connection from that server and distinguish inability to reach a service from inability to authenticate or select the remote object.
Finally, suppose login succeeds and a small query works, but a distributed report is slow. The evidence has moved beyond basic connection establishment. Examine the query plan, row volumes, waits, and work performed at both sites. A timeout parameter will not make an inefficient join efficient, and disabling Nagle's algorithm will not remove the cost of transferring an unnecessarily large result set.
For each investigation, write down the executable used, the originating host, the connect identifier, the requested service, and the exact error or measured behavior. This short record makes comparisons reproducible. It also helps another administrator recognize when two apparently identical tests actually use different Oracle installations, accounts, or configuration directories.
Before changing a network profile, retain the previous file and identify the affected processes. Decide what observation would show that the change worked. For example, correcting a service name should change the requested destination; enabling diagnostic tracing should produce evidence for the relevant connection attempt. Neither action should be described as a general performance improvement.
Review the parameter's activation requirements rather than assuming every file edit immediately affects existing sessions. Keep credentials out of shared troubleshooting notes, and return temporary tracing to the intended operational level after collecting evidence. A useful configuration record explains the requirement, the component changed, and the verification result, so a later administrator does not mistake a temporary diagnostic setting for an essential default.
Oracle Net Services combines naming, transport, listener connection handling, and database sessions. Configuration files describe behavior; NetCA, Net Manager, Listener Control, TNSPING, and SQL*Plus help configure or inspect different parts. Use current Oracle 26ai parameter definitions and distinguish an ordinary client connection from a database-link connection. The next lesson examines the components and functions of tnsnames.ora.
[1] TCP.NODELAY: Setting YES disables Nagle's algorithm for the applicable TCP connections. It removes that particular small-write coalescing behavior, not all application or operating-system buffering. It neither guarantees immediate delivery nor improves every workload. Evaluate changes with representative measurements.