| Lesson 4 | Oracle tracing parameters |
| Objective | Describe the functions of Oracle trace parameters and explain why they are still relevant in Oracle 23ai. |
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 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.
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.
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.
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.
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:
off (0), user (4), admin (10), and support (16) control the amount of detail generated.
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.
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:
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.
|
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:
support
level for stubborn issues. Knowing how to enable and control tracing saves time during SR handling.
tkprof, trace parameters provide detailed performance data down to the session level.
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:
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 23ai.