Database Reference
In-Depth Information
These logical session tags are very useful because, thanks to them, it's possible to extract information that's
relevant to your needs. For example, if you're investigating a performance problem related to a specific action, you
can isolate the part of the trace file related to it. You can do this using the tool described in the next section, TRCSESS.
Using TRCSESS
You can use the command-line tool TRCSESS to extract part of the information contained in one or more trace files,
based on the logical sections described in the previous section. If you run TRCSESS without specifying any argument
as input, you get a complete list of TRCSESS's arguments including a short description:
trcsess [output=<output file name >] [session=<session ID>] [clientid=<clientid>]
[service=<service name>] [action=<action name>] [module=<module name>]
<trace file names>
output=<output file name> output destination default being standard output.
session=<session Id> session to be traced.
Session id is a combination of session Index & session serial number e.g. 8.13.
clientid=<clientid> clientid to be traced.
service=<service name> service to be traced.
action=<action name> action to be traced.
module=<module name> module to be traced.
<trace_file_names> Space separated list of trace files with wild card '*' supported.
As you can see, it's possible to specify a session, a client identifier, a service name, a module name, and an action
name as an argument. For example, to extract the information about Action 12 from the DBM11203_ora_7978.trc trace
file and write the output in a new file named action12.trc , you can use the following command:
trcsess output=action12.trc action="Action 12" DBM11203_ora_7978.trc
Be aware that the clientid , service , action , and module arguments are case sensitive.
Profilers
Once you've identified the correct trace files, or possibly cut off part of some of them with TRCSESS, it's time to
analyze the content. For this purpose, you use a profiler . Its aim is to generate a formatted output based on the content
of raw trace files. Oracle distributes such a profiler with both the database and client binaries. Its name is TKPROF
(which stands for Trace Kernel PROFiler ). Even if the output it provides can be useful in several situations, sometimes
it's not adequate for quick identification of performance problems. Strangely, Oracle underestimates the importance
of such a tool and, consequently, has only marginally improved it since its introduction in Oracle7. A number of
commercial and freeware profilers are available, however. I've also developed my own profiler, which is freeware,
named TVD$XTAT. Other profilers you may want to consider are OraSRP, 3 Method R Profiler, and Method R Tools
suite. 4 Even Oracle (through Oracle Support) proposes another profiler, named Trace Analyzer. 5
The next two sections describe two of these profilers. First, I cover TKPROF. In spite of its deficiencies, it's the only
one that's always available. In fact, you aren't allowed in all situations to install another profiler on a database server
3 See http://www.oracledba.ru/orasrp for information.
4 See http://method-r.com for information.
 
 
Search WWH ::




Custom Search