TKPROF stands for transient kernel profiler.
Enabling SQL TRACE
To be able to use TKPROF, you must first enable sql trace. This can be done for either the instance or the session. If you want to change it for the entire instance, set into the file and restart the instance. However, usually, you'll want to turn on sql trace for a particular session only. This can be done like so:
or, from another session with a
sys.(session's id,serial number, true)
You can have Oracle include timing information into the sql as well. Either set the parameter to true or issue an
Finding the SQL trace file
The will be written into the directory pointed to by the parameter . You can query for the value with select value from where name = 'user_dump_dest'.
See to see where the tk prof file goes.
Format of the trace file
Maximum size of the trace file
The init parameter allows to set the maximum size of the . Valid values for this parameter are: unlimited, a number followed by a K or a M or a number. If the value is a number only, it indicates how many OS Blocks the file can grow to. K or M set the file's maximum size in kilo or mega bytes.
ThanksThanks to Julia Lovick who reported an error on this page.
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/330796/viewspace-867637/，如需转载，请注明出处，否则将追究法律责任。