- Oracle-Developer.com -
| Navigation:
Home | Discussion Forums (Get expert advice) |
Scripts |
About Us | Links | Job Openings
|
Oracle Developer > Scripts > Generate tkprof in Oracle 10g
| Tkprof is a very useful diagnostic tool
provided by Oracle to analyze trace files. After enabling the trace,
you can generate a report summarizing the trace contents by using the
tkprof utility. Here is one example of how to use it. In SQL Plus: SQL> ALTER SESSION SET EVENTS '10046 trace name context forever, level 8'; -- 8 includes waits and 12 includes waits and binds SQL> <execute your script> SQL> ALTER SESSION SET EVENTS '10046 trace name context off'; On the Operating System: cd <user_dump_dest> (find by select value from v$parameter where name = 'user_dump_dest') tkprof <SID_ora_sessionId.trc> SID_ora_sessionId.prf waits=yes* (other options explain=user/pass table=plan_table aggregate=no sys=no)
vi SID_ora_sessionId.prf * If you encounter an error with using one of the options, check your
Oracle tkprof client. For example, in RAC environments I have seen
the following error: This error was a result of having a 10g RAC database with the 8i tkprof utility from the Linux box.
|
Owned and Operated by Varun Jain, Inc, an Oracle Consulting Firm
Copyright ©2007 Oracle-Developer.com