This module examined how Oracle Net Services connects applications and databases. The central skill is following a connection through its separate stages: naming, network transport, listener handling, database authentication, and SQL access. Each stage has its own configuration and evidence. A successful test at one stage does not prove that the next stage will succeed.
In Oracle AI Database 26ai, these principles apply to ordinary client sessions and to outgoing connections initiated through database links. The older names SQL*Net and Net8 appear in historical material, but current administration uses Oracle Net Services documentation. This conclusion brings together the module's lessons and corrects terminology that can otherwise make troubleshooting confusing.
A name is useful only when you know what it identifies. The original shorthand of three names for a remote database hides several different objects. Use the following distinctions when reading a connection string, configuration file, or SQL statement.
| Identifier | Meaning | Example |
|---|---|---|
| Database name | DB_NAME identifies the database; it is not the client's alias or an instance SID. | SALES |
| Instance SID | Identifies an instance. The ORACLE_SID environment variable is commonly used to select a local instance. | sales1 |
| Database service | A named service requested by a connection, potentially associated with a PDB and application workload. | salespdb.example.com |
| Net service name | A client alias mapped to a connect descriptor by a naming method such as local naming. | REMOTE_SVC |
| Host name | Identifies the endpoint host through the configured network resolver. | remote-db.example.com |
| Database-link name | Names an object used by SQL in one database to access another database. | rdb in customer@rdb |
These identifiers can have similar spelling without becoming interchangeable. A service can be available through more than one instance, and an instance can support multiple services. For a PDB connection, use the appropriate database service instead of guessing a SID. Naming a client alias does not create that service or register it with a listener.
The opening lessons on Oracle Net architecture, parameter files, and network components and tools establish three different responsibilities. A file supplies settings, a running component performs work, and an administration tool helps inspect or change that component.
| File | Primary responsibility | Practical consequence |
|---|---|---|
tnsnames.ora | Maps local aliases to connect descriptors. | Useful for local naming; other naming methods can supply the destination. |
listener.ora | Configures listener endpoints and listener-specific behavior. | The listener process accepts requests; the file itself does not. |
sqlnet.ora | Supplies supported profile settings for the component that reads it. | Check parameter scope, active location, and client implementation. |
The historical protocol.ora filename is not the standard destination for the current TCP settings discussed in this module. Use documented 26ai parameter names and locations. Also avoid assuming that every server needs a manually written listener file: default listener operation and dynamic registration can reduce explicit configuration, while custom endpoints still need deliberate administration.
The lesson on locating sqlnet.ora adds an essential operational step. Identify the executable or driver and its environment before editing. Check TNS_ADMIN, applicable Oracle home and Oracle base home locations, and the account running the application. TNS_ADMIN names a directory. A Windows service, scheduled task, or container can use a different environment from your interactive terminal.
NetCA and Oracle Net Manager assist configuration; Listener Control inspects listeners. Their output must still be associated with the correct installation. A working SQL*Plus executable from one Oracle home cannot validate every application on the same computer. JDBC Thin and other clients also have their own supported connection properties and configuration behavior.
The tnsnames.ora lesson separates the address from the requested service. This illustrative local-naming entry contains both:
REMOTE_SVC =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = remote-db.example.com)
(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = salespdb.example.com)))
REMOTE_SVC is the alias, while salespdb.example.com is the service. The host and port identify a listener endpoint. Port 1521 is common, but the actual configured port controls the connection. This block is Oracle Net configuration syntax, not SQL; its parentheses describe nested groups.
From a correctly configured client terminal, sqlplus report_user@REMOTE_SVC requests a connection and prompts for the password. An Easy Connect alternative is sqlplus report_user@//remote-db.example.com:1521/salespdb.example.com. It supplies the destination directly and does not require that alias in a local naming file.
Host resolution follows the operating system's configuration, commonly DNS and sometimes a hosts file. It is separate from resolving an Oracle Net alias. Finding the host does not establish that the listener recognizes the requested service. Neither example constitutes a complete production encryption configuration.
Local naming, directory naming, Easy Connect, and supported centralized configuration providers offer different administration choices. Select a method supported by the actual clients, document ownership, and test changes from those clients. Centralizing naming can simplify distribution, but it does not automatically establish network access, database privileges, or application recovery.
The process-level communication lesson follows the initial connection separately from the established session. A remote TCP client reaches a listener and requests a service. The listener arranges access to a suitable handler. Database server code handles authentication and subsequent database work; the listener does not execute each query or relay every result.
With dedicated server, a dedicated server handles the connection. Shared server uses dispatchers and shared server processes to serve sessions. Local IPC connections stay on one host, while supported local bequeath connections can establish access without the ordinary listener path. Operating-system processes, threads, network connections, and database sessions are related concepts, but their counts are not interchangeable.
Dynamic service registration is performed by LREG. Registration advertises services and handlers to listeners; it does not create workstation aliases. If a reachable listener does not know a requested service, investigate service spelling, registration, and database or PDB state. Changing a password or extending a timeout would address a different stage.
The TCP settings and access-control lesson distinguishes network-source admission from database identity. Valid-node checking and its invited or excluded node lists apply in the appropriate listener environment. They do not grant table privileges. Review shared-listener dependencies and infrastructure addresses before applying a restrictive policy, and test both permitted and deliberately unapproved sources.
Authentication establishes identity; authorization permits operations; encryption and integrity protect traffic. Configure these requirements independently. Native network encryption policies are distinct from TLS over TCPS. A node that is permitted to reach a listener still needs acceptable authentication and database privileges. Consult the installed release and driver documentation before copying a security profile.
The TCP.NODELAY lesson addresses a specific transport behavior. Oracle Net 26ai documents YES as the default, disabling Nagle's algorithm for applicable TCP connections. This removes that small-send waiting rule. It does not eliminate application buffering, make every SQL call a separate packet, or guarantee better performance.
A slow report may spend most of its time executing SQL, waiting for locks, or making excessive round trips. Measure where the time goes before changing transport settings. Fetch sizing, row volume, distributed execution plans, and application request patterns can matter more than a socket option. Preserve supported defaults unless a controlled comparison demonstrates a benefit.
The sqlnet.ora characteristics lesson distinguishes opening a transport connection, completing inbound connection and authentication, and checking an established connection. Choose a setting for the stage you intend to control. A longer permitted wait does not repair an unreachable endpoint.
SQLNET.EXPIRE_TIME configures connection verification in minutes. It helps identify terminated or unusable connections and can use enhanced TCP keepalive detection where supported. It is not an idle-user logout policy or a SQL runtime limit. A healthy idle session can remain connected; failure detection is not a promise of cleanup at an exact stopwatch deadline.
For diagnostics, identify the applicable Automatic Diagnostic Repository home and whether ADR is enabled before relying on historical log-directory settings. Capture the exact error, time, connection origin, requested service, and relevant client version. Enable tracing only for a defined investigation, protect its contents, and restore the intended diagnostic level afterward.
The lessons on creating database links and using database-link connections apply the same architecture to a second connection. An application already connected to one database submits SQL that references a link. That database becomes the client of the remote database.
SELECT customer_id, customer_name
FROM customer@rdb
WHERE customer_id = 1001;
This example assumes an existing accessible link named rdb, matching remote objects, and sufficient privileges. Its connection identifier must resolve in the originating database's environment. Installing an alias only on the workstation cannot fix a missing mapping on the database host. A direct client connection to a remote database does not itself require a database link.
A private link belongs to its creating schema; public visibility is a separate choice. Authentication depends on the link type. For fixed-user links, remote access uses the configured identity. Other models differ. Link naming must also satisfy GLOBAL_NAMES requirements when enabled. A short example name is not a reason to disable that policy.
SELECT db_link, username, host
FROM user_db_links
ORDER BY db_link;
This query inspects links owned by the current user. ALL_DB_LINKS and DBA_DB_LINKS provide other visibility scopes. Their documented columns expose metadata, not plaintext passwords. In these views, HOST represents the Oracle Net connect string; it need not be only a machine name.
The retained illustration below shows an older local-naming connection sequence. Its labels are historical and should not be copied as an Oracle 26ai implementation recipe. Use the corrected naming distinctions and connection stages above when interpreting it.
DBA_DB_LINKS is a metadata view, not a source of readable passwords. ORACLE_SID is not a synonym for a database service. A hosts file and tnsnames.ora are not mandatory for every connection. The network labels do not describe one packet containing plaintext credentials. The listener arranges a handler connection; database server code authenticates and performs SQL work.A query can retrieve remote rows or combine data from several sites without updating multiple databases. A distributed transaction updates two or more distinct database nodes within one transaction. Oracle coordinates its outcome using distributed transaction mechanisms, including two-phase commit. Application code must still keep related changes within the intended transaction boundary.
In a typical two-phase commit, participating branches prepare as required, then receive the coordinated outcome. Read-only branches and the commit point site have special roles, so the simplified sequence is not identical at every node. Autocommit between business steps can split changes that were supposed to succeed together.
A failure during commit can leave an in-doubt transaction. RECO helps resolve these transactions when communication becomes possible; it is not the process that transports ordinary query rows. An uncertain commit response requires investigation before replaying a business operation. Preserve transaction identifiers and involve the DBA rather than guessing that every communication error means rollback.
Synonyms can simplify object references, but they do not grant privileges or remove a remote dependency. Likewise, a database link does not automatically replicate data, create a reverse link, or provide transparent application failover. These capabilities require their own design and validation.
Begin with the origin of the failing request. Record the application or database process, account context, connection identifier, and expected destination. Compare the working and failing cases before changing configuration. The following sequence keeps each observation tied to what it actually proves.
tnsping REMOTE_SVC assists naming and listener-reachability checks. It does not prove successful login, object access, or transaction behavior. A connection pool can also reuse an existing session, so test fresh connections when assessing new admission or connection settings.
Consider three common comparisons. If Easy Connect succeeds while an alias fails for the same endpoint, investigate naming. If a workstation connects while a database link fails, inspect the originating database's environment and network path. If login and a small query succeed while a report remains slow, investigate SQL execution, row transfer, and waits. These observations narrow the problem without turning every incident into a listener restart.
Before making an operational change, retain the current configuration and define an expected result. Follow the component's activation requirements, verify the result from the affected application, and record the rollback path. One successful test is evidence for its tested path, not a guarantee about every client or service.
After an authorized login, a small identity query can help confirm the session destination:
SELECT SYS_CONTEXT('USERENV', 'DB_NAME') AS database_name,
SYS_CONTEXT('USERENV', 'SERVICE_NAME') AS service_name,
SYS_CONTEXT('USERENV', 'CON_NAME') AS container_name
FROM dual;
Compare the returned database, service, and container with the application's intended destination. This observes the current session; it does not prove that a later pooled connection will select the same endpoint. For a database-link investigation, distinguish the local session's identity from the remote session used by the link. Document both destinations when the problem depends on which site executed an operation.
Finally, keep a useful handover record: the original symptom, configuration path, changed setting, test origin, expected result, actual result, and rollback location. This is more informative than a note saying only that networking was fixed. It allows another administrator to repeat the checks without reconstructing which client installation or database service was involved.
You should now be able to explain which process initiates a connection, how its destination is resolved, what the listener contributes, and where authentication and SQL work occur. You should also recognize the extra connection and transaction responsibilities introduced by database links. The next module applies these distinctions to Oracle Net server-side configuration.
Before continuing, use the Oracle SQL*Net Architecture Quiz to review the module. Explain your answers in terms of the component and connection stage involved, especially when distinguishing names, configuration files, and database-link behavior.