Logging | Tracing   « Prev  Next »

Lesson 4 Oracle tracing parameters
Objective Describe the functions of Oracle trace parameters and explain why they are still relevant in Oracle 23ai.

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:

In older releases such as Oracle8i, these settings were spread across init.ora, sqlnet.ora, and listener.ora. In Oracle 23ai, the same ideas still apply, 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 23ai.

Oracle trace and dump files: what they are

Oracle uses several kinds of diagnostic files:

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 23ai 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

Secure Configuration Checklist

In this older model:

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:

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 23ai: ADR and DIAGNOSTIC_DEST

Starting with Oracle 11g and continuing through Oracle 23ai, 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 23ai, 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:

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 23ai 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. Modern 23ai environments still support these, but tracing integrates with ADR when DIAG_ADR_ENABLED is turned on.

Key concepts:

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.

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 23ai.

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 10) – 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_FILEAGE_SERVER Set manually Similar to TRACE_FILEAGE_listener_name, but applies to server trace files. When the age limit is reached, trace output rolls over to the next file, subject to TRACE_FILENO_SERVER.
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 23ai

Even though Oracle 23ai introduces new AI-driven capabilities and runs increasingly in cloud and containerized environments, traditional trace parameters remain a cornerstone of diagnosability:

The biggest difference in 23ai is not what trace parameters mean, but where their output lives and how you manage it. With ADR, you gain:

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 23ai.

Practical guidelines for using trace parameters

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