Logging | Tracing   « Prev  Next »

Lesson 2 An overview of log and trace files
Objective Compare log files and trace files.

Overview of log Trace Files and logging

Let us compare log files with trace files so you fully understand their uses and differences. When logging is enabled, all errors encountered in Oracle network products are written to a log file. The log file provides additional information for the DBA when the error message on the screen is inadequate to fully troubleshoot the failure. By displaying the “error stack” the log file shows the state of the software at various layers, and this information will give you the clues that you need to solve the problem.

Oracle Tracing

The trace facility allows the DBA to obtain more information on the internal operations of the components of a Net8 transaction than can be found in the log files. Tracing an operation produces a detailed sequence of statements that describe the events as they are executed. The DBA invokes the trace utility during or after the occurrence of an abnormal condition when the log file does not provide a clear indication of the cause.
Note: Oracle tracing is a very expensive operation. Tracing requires a huge amount of disk space since every detail about the transaction will be written to the trace files. In addition, there is a significant burden for the program to write the details to the a log file, with the result that database performance may suffer while capturing the trace. The prudent DBA only uses tracing as a last resort and only for a very short duration.

Difference between Logging and Tracing

While logging reveals the state of the Oracle components at the time of an error, tracing provides a description of all events as they occur, and provides additional information about the state of events immediately prior to an error. In short, Oracle trace files enhance the log files and provide more detailed information about each SQL*Net and Net8 transaction. Now that you have reviewed the basic differences, let us look at where the log and trace files reside on an Oracle server.

Setting Tracing Parameters

Parameters that control tracing, including the type and amount of information trace, and the location where the files are stored, are set in the configuration file of each network component as described in Table 7-2 below.
Table 7-2 Location of Trace Parameters
Configuration File  
cman.ora Oracle Connection Manager processes
listener.ora Listener
sqlnet.ora Client
Database server
TNSPING utility