Lesson 7
Oracle Trace Files Conclusion
In this module we have reviewed the basic functions of the Oracle trace files and
their uses by Oracle technical support and the DBA. You should now be able to:
- Describe the functions of two types of trace files
- Find the location of trace files on any Oracle database
- Interpret information contained in trace files
- Create Oracle trace files to diagnose problems
- Set events to produce trace files
In Oracle 19c, as in previous versions, trace files are created whenever an Oracle instance starts, or when an unexpected event occurs in a user process or background process. These trace files are essential for diagnosing issues, as they contain detailed information about the operations and errors that occurred.
The naming convention for trace files in Oracle 19c remains consistent with earlier versions. The trace file names typically include the instance name, the process name (such as `pmon`, `smon`, `lgwr`, etc.), and the Oracle process number (PID). This naming convention helps administrators quickly identify the source of the trace files and relate them to specific processes or instances within the Oracle environment.
These trace files are usually stored in the `trace` directory within the Oracle Diagnostic Destination (`diag`), which is part of the Automatic Diagnostic Repository (ADR) in Oracle 19c. This helps in efficiently managing and accessing trace files for troubleshooting and performance tuning.
Trace Files
A trace file is created each time an Oracle instance starts or an unexpected event occurs in a user process or background process.
The name of the trace file includes the instance name, the process name, and the Oracle process number. The file
extension or file type is usually TRC, and, if different, is noted in your operating
system-specific Oracle documentation.
The contents of the trace file may include dumps of the system global area, process global area, supervisor stack, and registers.
Two initialization parameters specify where the trace files are stored:
- BACKGROUND_DUMP_DES specifies the location for trace files created by the Oracle background processes PMON, DBWR, LGWR, and SMON.
- USER_DUMP_DEST specifies the location for trace files created by user processes such as SQL*Loader or Pro*C.
The Alert file also describes the location of trace files generated when internal errors occur. See the next section for a description of the Alert file.
You may need to format the trace file before using it to diagnose problems. To
format a trace file, use the DUMPFMT utility, which is available on most systems
and is described in your operating system-specific Oracle documentation. Oracle
Customer Support may ask you for a formatted trace file to help solve a problem.
New terms
Here are some terms from this module that may have been new to you:
- Trace file
- tkprof
- dbms_support package: Identify the session details (SID & Serial#) which we need to trace from v$session using the available information like Machine/osuser/username.
- oradebug:oradebug is a debugging tool that allows to inspect and change memory in the instance.
The commands of this tool are executed from within SQL*Plus by prepending the commands with oradebug .
Next, you will learn to monitor Oracle events.
Trace Files - Quiz
<%@ include file="../../semrush7.jsp" %>