Call (800) 766-1884 for Oracle support & training
Free Oracle Tips


Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance
 

Free Oracle Tips


 

HTML Text

BC Oracle tuning

Oracle training

Oracle support

Remote Oracle

 

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 certain tags.

otrccol start 1 otrace_input_file

The contents of otrace_input_file are:

col_name=test_collection
dat_file=test_collection.dat
cdf_file=test_collection.cdf
fdf_file=ORACLED.fdf
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 statistics.

• ORACLED – the default server event set that collects statistics for the database.

• 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 Advisor application.
 

Enabling tracing will create two files in the directory specified for oracle_trace_collection_path. It uses the collection name as part of the file name:

54,243 test_collection.cdf
5,433,236 test_collection.dat

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.

cdf_file=test_collection.cdf
col_name=test_collection
 



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 Rampant TechPress.


 


  ”call


Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

  
 

Oracle performance tuning software 
 
 
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 
   

Copyright © 1996 -  2014 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.