Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Kshitij.

Asked: May 25, 2017 - 6:09 am UTC

Last updated: May 25, 2017 - 10:00 am UTC

Version: Oracle 12c

Viewed 1000+ times

You Asked

Hey

How can I look into the tkprof formatted trace file after executing the following commands for my function :-

1) exec dbms_monitor.session_trace_enable(waits=>true)
2) run the function
3) exec dbms_monitor.session_trace_disable


Thanks in advance

with LiveSQL Test Case:

and Chris said...

You need to locate the trace file on the database server. Connor discusses how to do this in this video:



Once you've found the file, just run:

tkprof <trace_file_name> <output_file_name>


Or you can load it into SQL Developer and view it there:

https://orastory.wordpress.com/2015/02/27/sql-developer-viewing-trace-files/

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

DBMS_MONITOR

More on PL/SQL routine DBMS_MONITOR here