Home » SQL & PL/SQL » SQL & PL/SQL » trace file
trace file [message #38830] Sat, 18 May 2002 15:53 Go to next message
Mark
Messages: 284
Registered: July 1998
Senior Member
Hello, how do I execute the tkprof.exe on a trace file to produce an output.lst file?
SQL> alter session set sql_trace = true;
Session altered.

SQL> set serveroutput on
SQL> declare
2 mydate date;
3 begin
4 mydate := sysdate;
5 end;
6 /

PL/SQL procedure successfully completed.

SQL> alter session set sql_trace = false

Need to run> tkprof ora00897.trc out.lst
Re: trace file [message #38910 is a reply to message #38830] Sun, 26 May 2002 11:45 Go to previous message
Su
Messages: 154
Registered: April 2002
Senior Member
Open an MSDOS window by giving HOST at your SQL prompt. After it opens an MSDOS window, enter the tkprof command at DOS prompt in the following format:

C:> TKPROF your_trace_file.trc your_out_file.txt EXPLAIN=username/password SORT=option

The following options can be given to sort:
prs - sort on values during parse calls
exe - sort values during execute calls (equivalent to open cursor for a query)
fch - sort on values during fetch calls (queries only)

After it returns the command prompt, open the output text file in any editor to view it.

If you still need any help, mail me I would be happy to help you.

Good luck :)
Previous Topic: Commit N-rows in PL/SQL
Next Topic: parameterized view
Goto Forum:
  


Current Time: Thu Apr 25 13:49:23 CDT 2024