| Lesson 5 | Turning on Network Services logging and tracing |
| Objective | Turn on logging and tracing for Network Services |
In earlier Oracle releases the focus of this lesson was Net8 and SQL*Net. Today, in Oracle Database 23ai, the same concepts live on under the name Oracle Net Services. Logging and tracing are still available, but you typically enable them only when you are troubleshooting or working with Oracle Support, not as a permanent setting.
The goal of this lesson is to show how Oracle Net logging and tracing work, explain why they were essential in the Net8 era, and then place those skills in a modern context that includes Oracle 23ai features such as Easy Connect Plus, TLS 1.3, and the Automatic Diagnostic Repository (ADR).
Oracle Net produces two main kinds of diagnostic output:
Tracing produces more volume and overhead than logging, so you normally enable tracing at higher levels only for short, targeted diagnostic sessions.
In the original version of this lesson, you enabled tracing by editing
listener.ora and sqlnet.ora or by using Enterprise Manager’s
component controls. Those files are still used in Oracle 23ai, but the terminology has shifted from
“Net8” to “Oracle Net Services.”
Some key ideas from the historical material remain useful:
$ORACLE_HOME/network/trace and controlled by parameters in
listener.ora, such as
TRACE_LEVEL_*, TRACE_DIRECTORY_*, and
TRACE_FILE_*.:contentReference[oaicite:2]{index=2}
sqlnet.ora with parameters such as
TRACE_LEVEL_CLIENT, TRACE_DIRECTORY_CLIENT,
TRACE_FILE_CLIENT, and TRACE_UNIQUE_CLIENT.:contentReference[oaicite:3]{index=3}
For example, a typical client tracing configuration in the Net8 era looked like this:
TRACE_LEVEL_CLIENT=SUPPORT
TRACE_DIRECTORY_CLIENT=/tmp/client_traces
TRACE_FILE_CLIENT=netcli.trc
TRACE_UNIQUE_CLIENT=ON
TRACE_TIMESTAMP_CLIENT=ON
These settings are still valid in 23c/23ai, but they are now part of a broader diagnostics stack that includes ADR and cloud-centric logging.
Yes, but only selectively. In Oracle 23ai you rarely turn on detailed Oracle Net tracing by default. Instead:
So the skill is still relevant—but the default posture in 23ai is: keep tracing off until you need it, then enable it temporarily with clearly defined scope and retention.
In Oracle Database 23ai, the mechanics of enabling tracing are essentially the same, but you should think about them in the context of Easy Connect Plus, TLS, and ADR:
tnsnames.ora, sqlnet.ora) for common use cases.:contentReference[oaicite:6]{index=6}ADR_BASE directory, even when you still use traditional Net Services parameters.:contentReference[oaicite:7]{index=7}TRACE_LEVEL_CLIENT,
TRACE_LEVEL_SERVER, and listener trace settings are still documented and supported in 23c/23ai.:contentReference[oaicite:8]{index=8}
On a client or application tier that still uses sqlnet.ora, you might enable temporary tracing
like this:
# sqlnet.ora (Oracle 23ai client) - temporary tracing for diagnostics
TRACE_LEVEL_CLIENT=SUPPORT
TRACE_DIRECTORY_CLIENT=/u01/app/oracle/net_traces
TRACE_FILE_CLIENT=app_client.trc
TRACE_UNIQUE_CLIENT=ON
TRACE_TIMESTAMP_CLIENT=ON
After you reproduce the problem and collect the trace file, you disable tracing again (for example, by
commenting out TRACE_LEVEL_CLIENT or setting it to OFF).
For the listener, tracing is still controlled in listener.ora or via the Listener Control
Utility (lsnrctl):
# listener.ora - sample snippet
TRACE_LEVEL_LISTENER=SUPPORT
TRACE_DIRECTORY_LISTENER=/u01/app/oracle/net_traces
TRACE_FILE_LISTENER=listener.trc
TRACE_TIMESTAMP_LISTENER=ON
TRACE_UNIQUE_LISTENER=ON
You can also toggle tracing dynamically with:
lsnrctl
LSNRCTL> set current_listener LISTENER
LSNRCTL> set trc_level SUPPORT
LSNRCTL> set trc_directory /u01/app/oracle/net_traces
LSNRCTL> set trc_file listener.trc
In 23ai, this “on-demand” approach to listener tracing fits well with automation and configuration-as-code practices, where you keep changes small, documented, and easily reversible.:contentReference[oaicite:9]{index=9}
From a configuration-management perspective, turning on Oracle Net logging and tracing should be treated as a controlled change:
sqlnet.ora and
listener.ora templates.In summary, you no longer leave high-volume tracing on all the time, but you still need to understand Oracle Net logging and tracing so you can turn them on intelligently when Oracle 23ai network problems arise.