Donald K. Burleson
Oracle Utilities Tips
The Oracle Trace Utility
Starting Oracle Trace
Once oracle_trace_enable=true, tracing can be activated. When tracing is
active, the current sessions will be logged. The otrccol executable is used
to start Oracle Trace and requires a job_id and an input parameter file.
Any number can be specified for the job_id, but the input file must contain
otrccol start 1 otrace_input_file
The contents of otrace_input_file are:
regid=1 192216243 0 0 5 ORCL92
The col_name is the name of the collection determined by the person
initiating the trace. The dat_file and cdf_file parameters are simply the
files that will be used by Oracle Trace to store internal information. For
consistency, use the same name as specified in the col_name and add the
appropriate file extension (.dat and .cdf). The fdf_file parameter
specifies the facility name to be used by Oracle Trace and maps to a server
the event specified by the user. The server event sets that can be used as
values for the fdf_file are ORACLE, ORACLEC, ORACLED, ORACLEE, and ORACLESM.
And finally, the reg_id parameter is always the number 1 192216243 0 0 5
concatenated with the SID of the database.
Oracle Trace Server Event Sets
• ORACLE – collects all statistics, including wait events.
• ORACLEC – the Cache I/O event set that collects buffer cache I/O
• ORACLED – the default server event set that collects statistics for the
• ORACLEE – the expert event set that collects statistics for the Oracle
Expert tool in OEM.
• ORACLESM – the summary event set that collects statistics for the Summary
Enabling tracing will create two files in the directory specified for
oracle_trace_collection_path. It uses the collection name as part of the
The .cdf file contains collection profile information while the .dat file
holds the binary trace data. The .dat file can become extremely large
depending on the amount of time tracing is enabled.
Stopping Oracle Trace
When the DBA decides tracing has run long enough, it can be stopped by:
otrccol stop 1 otrace_stop_file
The number (1) is the job_id that matches the one used in the start
command. The contents of otrace_stop_file include the cdf file name along
with the collection name.
For more details on Oracle utilities, see
the book "Advanced
Oracle Utilities" by Bert Scalzo, Donald K.
Burleson, and Steve Callan.
You can buy it direct from the publisher for
30% off directly from
Download your Oracle scripts now:
definitive Oracle Script collection for every Oracle professional DBA