Trace Files   «Prev  Next»
Lesson 2Trace files - an overview
ObjectiveDescribe the functions of two types of trace files.

Oracle Trace Files

When an internal error is detected by a process, it dumps information about the error to its trace file, which is a detailed record of everything that occurs within the database.
Some of the information written to a trace file is intended for the database administrator, while other information is for Oracle support. In addition to providing diagnostic information, trace file information can be used to tune applications and instances.

Background Process Trace Files

Each server and background process in Oracle can write to a trace file. Trace files from a background process are generally meant for Oracle technical support. You'll rarely have to interpret information from these types of files. You will, however, have to be able to identify and locate these files. Background process trace files are stored in the location specified by the background_dump_dest init.ora parameter, and will be prefixed with the process name. For example, traces generated by the database writer process will begin with dbwr and end with .trc, such as dbwr_20234_mysid.trc.

User-related trace files

background process trace file
  1. A background process trace file begins with a prefix that indicates which process generated it. As you can see, this file is related to the Database Writer.
  2. All trace files end with the extension .trc
  3. User-related trace files (from an individual session) always begin with the prefix ora.

Oracle Errors generated from Background Process Trace Files

In Oracle, background process trace files are generated to record detailed information about the behavior and performance of various background processes, such as the database writer process, the log writer process, and the checkpoint process. These trace files can be used to diagnose and troubleshoot issues with the background processes.
If an error occurs with a background process, Oracle may generate one or more error messages in the trace file. Some common Oracle errors that are generated with respect to background process trace files include:
  1. ORA-00470: LGWR process terminated with error: This error is generated when the log writer process terminates abnormally due to an error. The trace file may contain additional information about the cause of the error.
  2. ORA-00600: Internal error code: This error is a generic error message that indicates that an internal error has occurred in the Oracle database. The trace file may contain additional information about the specific error that occurred.
  3. ORA-07445: Exception encountered: This error is generated when a background process encounters an unhandled exception. The trace file may contain additional information about the cause of the exception.
  4. ORA-04031: Unable to allocate n bytes of shared memory: This error is generated when a background process runs out of memory. The trace file may contain additional information about the memory usage of the process and the cause of the error.
  5. ORA-27102: Out of memory: This error is generated when a background process is unable to allocate memory from the operating system. The trace file may contain additional information about the memory usage of the process and the available system resources.

These are just a few examples of the Oracle errors that can be generated with respect to background process trace files. It's important for database administrators and performance analysts to monitor these trace files and investigate any errors that occur, in order to ensure the smooth operation of the Oracle database.

Note: Within Oracle, trace files and dump files are stored on the database server as a standard flat file.
Next, you will learn a method for locating all trace files on any Oracle server.