Logging | Tracing   « Prev  Next »

Lesson 4Oracle tracing parameters
ObjectiveDescribe the functions of Oracle trace parameters and explain why they are still relevant in Oracle 26ai.

Oracle Tracing Parameters and Their Role in Modern Diagnostics

Tracing is one of the most powerful diagnostic tools you have as an Oracle DBA or network administrator. While log files capture high-level events and errors, trace files record a detailed, step-by-step picture of what is happening inside the database instance and the network stack.

Oracle trace parameters let you decide:
  • Which components (client, server, listener, background processes) will produce detailed diagnostics.
  • How much detail is written (off, user, admin, or support level tracing).
  • Where trace files are stored and how their size and age are controlled.
In older releases such as Oracle8i, these settings were spread across a text initialization file, init.ora, along with sqlnet.ora and listener.ora. That file format is not deprecated; init.ora (a PFILE) is still fully supported today, it is simply less convenient for ongoing administration than a server parameter file (SPFILE), which supports persistent ALTER SYSTEM changes without manual file editing; see Additional Database Parameters for the distinction. In Oracle 26ai, the same tracing ideas still apply regardless of which parameter file style is in use, but the diagnostic infrastructure has evolved around the Automatic Diagnostic Repository (ADR). Understanding the original parameters helps you read legacy documentation and maintain older systems, while the modern view shows how they map into 26ai.

Oracle Trace and Dump Files: What They Are

Oracle uses several kinds of diagnostic files:
  • Alert log: chronological record of major database events (startup, shutdown, log switches, critical errors).
  • Trace files: detailed diagnostics for background processes, server processes, and client/network activity.
  • Dump/core files: deep diagnostic snapshots generated for serious internal errors.
Trace parameters tell Oracle which of these files to produce and where to place them. The examples below show the traditional parameters you still see in older scripts and books; after that, we connect them to the modern Oracle 26ai environment.

Standard Oracle Dump Parameters (Legacy Example)

Historically, Oracle used a set of initialization parameters to identify trace and dump locations. You can still see these parameters in older databases or in example code:

SQL > show parameters dump
NAME                                TYPE    VALUE
----------------------------------- ------- ------------------------------
background_core_dump                string  full
background_dump_dest                string  ?/rdbms/log
core_dump_dest                      string  ?/dbs
max_dump_file_size                  string  10240
shadow_core_dump                    string  full
user_dump_dest                      string  ?/rdbms/log

In this older model:
  • background_dump_dest: directory for background process trace files (LGWR, DBWn, SMON, PMON, and so on).
  • user_dump_dest: directory for user server process trace files (for example, SQL trace for a specific session).
  • core_dump_dest, background_core_dump, shadow_core_dump: control where and how core files are written.
  • max_dump_file_size: prevents runaway trace from consuming unlimited disk space.
Although this example predates ADR, the idea is still important: you must always know where your trace files are going, and you must protect the filesystem from being overwhelmed by uncontrolled tracing.

Trace and Dump Files on Disk (Legacy Directory Layout)

Once you know the dump destinations, you can inspect the directory on the server. The following example shows a traditional layout under $ORACLE_HOME/rdbms/log:

dilbert> cd $ORACLE_HOME/rdbms/log
dilbert> ls
alert_fred.log
reco_34326.trc
smon_57560.trc
snp1_54580.trc
ora_58718.trc
dbwr_38406.trc
lgwr_36106.trc
pmon_52070.trc

You can see several important patterns:
  • alert_fred.log: the alert log for the fred database, historically stored with background traces.
  • pmon_*.trc, smon_*.trc, dbwr_*.trc, lgwr_*.trc: trace files for specific background processes.
  • reco_*.trc: trace produced by the Recoverer process.
  • ora_*.trc: generic server process traces, often connected to user sessions or jobs.
Even when you move to newer versions, these naming conventions help you quickly identify which process generated a trace file and what kind of activity you are looking at.

How This Changes in Oracle 26ai: ADR and DIAGNOSTIC_DEST

Starting with Oracle 11g and continuing through Oracle 26ai, the database centralizes diagnostic data in the Automatic Diagnostic Repository (ADR). Instead of manually managing BACKGROUND_DUMP_DEST and USER_DUMP_DEST, you configure DIAGNOSTIC_DEST, and Oracle derives the underlying directories automatically.

In 26ai, trace files, the alert log, incident reports, and dumps are stored under a structured path rooted at DIAGNOSTIC_DEST (typically something like $ORACLE_BASE/diag/rdbms/DB_UNIQUE_NAME/INSTANCE_NAME/trace). You view and manage these files using standard tools and the adrci utility, but the conceptual mapping is unchanged:
  • Background and user processes still write trace files; they now live under the ADR directory tree.
  • Trace parameters still control whether a component writes detailed diagnostics.
  • File size, file age, and rotation are still critical to protect the diagnostic repository.
For students who encounter legacy references to background_dump_dest or user_dump_dest, think of them as an older way to say "where the ADR trace directory lives." Oracle 26ai formalizes that concept with DIAGNOSTIC_DEST and ADR.

Network Tracing with sqlnet.ora (Client and Server)

Oracle Net Services tracing is controlled primarily in sqlnet.ora on both client and server. In Net8-era documentation you will often see references to sqlnet.trc for the client and svr_pid.trc for the server; these remain the current default trace file names, even though "Net8" itself is a legacy name for what is now simply Oracle Net. Modern 26ai environments still support these file names, but tracing integrates with ADR when DIAG_ADR_ENABLED is turned on, and current deployments more often reach for Easy Connect Plus or an OCI-native connection method than classic Net8-style naming; see Oracle 23ai OCI Service Connection Methods for the current approach.

Key concepts:
  • Client tracing: used when you need to see what a particular client is doing on the network, for example to debug timeouts or handshake failures.
  • Server tracing: used to diagnose issues observed at the database side, such as protocol mismatches or connection storms.
  • Trace levels: off (0), user (4), admin (6), and support (16) control the amount of detail generated. Oracle Connection Manager is the one component where admin maps to 10 instead of 6; for the client, server, and listener, it is 6.
  • Trace directories/files: configured via trace directory and file parameters, or automatically derived from the ADR configuration.
On Windows and Linux, you may still see older examples showing sqlnet.ora under paths like c:\orant\network\admin or $ORACLE_HOME/network/admin. The exact directory changes between releases and deployment styles (on-premises, Instant Client, or OCI), but the idea remains: sqlnet.ora is the central place where you enable or disable network tracing.

While you are in sqlnet.ora, it is also worth setting sane connection timeouts alongside your tracing parameters, so a stuck connection attempt fails fast enough to leave a useful trace entry rather than hanging indefinitely; see Setting TNS Timeout Values for the outbound, inbound, send, and receive timeout settings.

Listener Tracing with listener.ora

The Oracle Net Listener is a separate server-side process that accepts incoming connections and hands them off to database instances. When connection problems are hard to diagnose using only the listener log, you can enable listener tracing using parameters in listener.ora.

The table below summarizes the most important listener tracing parameters. The names come from legacy documentation, but they still apply in modern Oracle releases, including 26ai. In practice, the modern recommendation is to keep TRACE_LEVEL_listener_name minimal day to day and lean on ADR's own diagnostics first; when you do need to change it, lsnrctl help (or lsnrctl help trace) from the Listener Control utility always reflects the exact syntax your installed release supports, which is more reliable than any static table. See the LSNRCTL Help Utility for more on using it.

Table 7-4 listener.ora Trace Parameters
listener.ora Parameter OEM Cloud Control/Net Manager Field Description
TRACE_LEVEL_listener_name Select a trace level / Trace Level Controls the level of detail written to the listener trace file. The value can be either a number between 0 and 16 (0 = no tracing, 16 = maximum tracing) or one of the following keywords:
  1. off (equivalent to 0): no tracing.
  2. user (equivalent to 4): traces user-induced error conditions, such as invalid connect descriptors.
  3. admin (equivalent to 6): traces installation-specific or configuration problems.
  4. support (equivalent to 16): maximum detail, intended for use with Oracle Support Services.
In day-to-day operations you typically leave this parameter at off and enable tracing temporarily for a specific troubleshooting session.
TRACE_DIRECTORY_listener_name
TRACE_FILE_listener_name
Trace File Specifies the destination directory and file name for listener trace output when non-ADR tracing is in use. By default, the directory is ORACLE_HOME/network/trace and the file name is listener.trc. In ADR-enabled environments, the effective trace directory is under the ADR base instead, but the conceptual role of these parameters is the same: they determine where listener trace data is written.
TRACE_FILEAGE_listener_name Set manually Specifies the maximum age of listener trace files in minutes. When the age limit is reached, tracing continues in the next file. The maximum number of trace files is controlled by TRACE_FILENO_listener_name.
TRACE_FILELEN_listener_name Set manually Sets the maximum size of a listener trace file in kilobytes. When this size is reached, trace output is redirected to the next file. Use this parameter together with TRACE_FILENO_listener_name to prevent diagnostic files from consuming too much storage.
TRACE_FILENO_listener_name Set manually Specifies how many listener trace files are used in a cyclical fashion. The first file is filled, then the second, and so on. After the last file reaches its age or size limit, the first file is reused.

For example, if the base file name is listener.trc and this parameter is set to 3, the files will be named listener1.trc, listener2.trc, and listener3.trc. Traces within these files are tagged with the file sequence number, making it easier to associate events with a particular tracing window.
TRACE_TIMESTAMP_listener_name Set manually Adds a timestamp of the form dd-mon-yyyy hh:mi:ss:mil to every listener trace event. Timestamps are essential when you correlate trace output with application logs, OS logs, or database alert logs.

Why Trace Parameters Are Still Relevant in Oracle 26ai

Even though Oracle 26ai continues to add new AI-driven capabilities and runs increasingly in cloud and containerized environments, traditional trace parameters remain a cornerstone of diagnosability:
  • Root-cause analysis: When an intermittent network error or connection timeout occurs, trace files are often the only place where you can see the exact sequence of events and protocol messages.
  • Supportability: Oracle Support frequently requests trace files at support level for stubborn issues. Knowing how to enable and control tracing saves time during SR handling.
  • Change impact verification: After network changes (firewalls, load balancers, OCI gateways, or Easy Connect Plus upgrades), trace files help verify that the new path is being used and that encryption/SSL negotiation works as expected.
  • Performance investigations: In combination with SQL trace and tools like tkprof, trace parameters provide detailed performance data down to the session level.
The biggest difference in 26ai is not what trace parameters mean, but where their output lives and how you manage it. With ADR, you gain:
  • A central diagnostic repository for multiple instances and components.
  • Consistent directory layouts and naming conventions for all trace and dump files.
  • Command-line tools (adrci) and views for querying incidents and problems.
In other words, the legacy parameter names remain worth learning because they appear in older scripts, views, and sample configurations, but you should always interpret them in the context of ADR and DIAGNOSTIC_DEST when working with Oracle 26ai.

Practical Guidelines for Using Trace Parameters

  • Keep tracing off by default; enable it only for focused troubleshooting.
  • Start with user-level tracing and move up to admin or support only when needed.
  • Always set file size and file count limits (or rely on ADR rotation) to avoid filling disks.
  • Document how to enable and disable tracing as part of your configuration management procedures.
  • After collecting required diagnostics, turn tracing back off and archive or purge old trace files.

Bringing It Together

Across this module, the pattern has stayed consistent even as the underlying technology moved from init.ora dump parameters through classic sqlnet.ora/listener.ora trace files to ADR. Every component, the database instance, the listener, the client and server, and Oracle Connection Manager, exposes the same basic controls: a level that decides how much detail gets written, a location for the resulting output, and a rotation scheme so that output doesn't grow without bound. Learning that pattern once, rather than memorizing each component's parameter names in isolation, is what makes legacy documentation readable and new documentation unsurprising. The specific parameter names in this lesson will keep showing up in older scripts, forum answers, and sample configurations for years to come; knowing what they map to in a current, ADR-based 26ai environment is what turns that old material from a liability into a still-useful reference.

Log Trace Files – Quiz

Before moving on to the next lesson, click the Quiz link below to test your mastery of the basic concepts surrounding logging and tracing.
Log Trace Files – Quiz

SEMrush Software 4 SEMrush Banner 4