Database Reference
In-Depth Information
To find the right trace file easily, using the tracefile_identifier initialization parameter is also possible. In fact,
with that initialization parameter, you can add a custom identifier of up to 255 characters to the trace file name. With
it, the trace file name structure becomes the following:
{instance name}_{process name}_{process id}_{tracefile identifier}.trc
The tracefile_identifier initialization parameter can only be set at the session level and only with dedicated
server processes. It's also worth noting that every time a session dynamically changes the value of that initialization
parameter, a new trace file is automatically created. The value of the tracefile_identifier initialization parameter
is available in the traceid column of the v$process view. Be careful in version 10.2, though: this is true only for the
very same session that set the initialization parameter. All other sessions see the value NULL .
Now that you've seen what SQL trace is and how to configure, enable, and disable it, and where to find the trace
files it generates, let's discuss their structure and some tools used to analyze, and consequently leverage, their content.
Structure of the Trace Files
A trace file contains information about the database calls executed by a specific process. Actually, when the process
identifier is reused at the operating system level, a trace file may contain information from several processes as well.
Because a process may be used from different sessions (for example, for shared servers or parallel slave processes)
and each session may have different session attributes (for example, module name and action name), a trace file can
be separated into several logical sections. Figure 3-3 provides an example (both trace files are available along with the
other files of this chapter).
 
Search WWH ::




Custom Search