Home » RDBMS Server » Server Utilities » Problem while TKprof (ORacle10g)
Problem while TKprof [message #395707] Thu, 02 April 2009 06:28 Go to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

Hi To All,
I have probelm while generating the trace file .The steps I used as given as below ,
Please Let me know where I am doing wrong.
My Trace file is not generating.

1.
set timing on;
alter session set timed_statistics = true;
alter session set events '10046 trace name context forever, level 12';
alter session set events '10046 trace name context off ';

2.Goto FileZilla
-Connect to the Oracle.
-Then Put the above path found in step1.
-Copy the given trace file in the required path.
3.Run the tkprof.To convert Trace .trc file into .Txt file.


4.TKPROF D:\<Trace_FIle_Name> D:\<Txt_FIle_Name>.txt sys=no explain=test/test@test.com;

To Find out sessionID i used follwoing ,
5.SELECT s.sid,
s.serial#,
pa.value || '/' || LOWER(SYS_CONTEXT('userenv','instance_name')) ||
'_ora_' || p.spid || '.trc' AS trace_file
FROM v$session s,
v$process p,
v$parameter pa
WHERE pa.name = 'user_dump_dest'
AND s.paddr = p.addr
AND s.audsid = SYS_CONTEXT('USERENV', 'SESSIONID');

Re: Problem while TKprof [message #395713 is a reply to message #395707] Thu, 02 April 2009 06:46 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is the problem?

Regards
Michel
Re: Problem while TKprof [message #395716 is a reply to message #395713] Thu, 02 April 2009 06:52 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

Quote:
.TKPROF D:\<Trace_FIle_Name> D:\<Txt_FIle_Name>.txt sys=no explain=test/test@test.com;


Check Tkprof syntax.

D:\>tkprof
Usage: tkprof tracefile outputfile [explain= ] [table= ]
              [print= ] [insert= ] [sys= ] [sort= ]
  table=schema.tablename   Use 'schema.tablename' with 'explain=' option.
  explain=user/password    Connect to ORACLE and issue EXPLAIN PLAN.
  print=integer    List only the first 'integer' SQL statements.
  aggregate=yes|no
  insert=filename  List SQL statements and data inside INSERT statements.
  sys=no           TKPROF does not list SQL statements run as user SYS.
  record=filename  Record non-recursive statements found in the trace file.
  waits=yes|no     Record summary for any wait events found in the trace file.
  sort=option      Set of zero or more of the following sort options:
    prscnt  number of times parse was called
    prscpu  cpu time parsing
    prsela  elapsed time parsing
    prsdsk  number of disk reads during parse
    prsqry  number of buffers for consistent read during parse
    prscu   number of buffers for current read during parse
    prsmis  number of misses in library cache during parse
    execnt  number of execute was called
    execpu  cpu time spent executing
    exeela  elapsed time executing
    exedsk  number of disk reads during execute
    exeqry  number of buffers for consistent read during execute
    execu   number of buffers for current read during execute
    exerow  number of rows processed during execute
    exemis  number of library cache misses during execute
    fchcnt  number of times fetch was called
    fchcpu  cpu time spent fetching
    fchela  elapsed time fetching
    fchdsk  number of disk reads during fetch
    fchqry  number of buffers for consistent read during fetch
    fchcu   number of buffers for current read during fetch
    fchrow  number of rows fetched
    userid  userid of user that parsed the cursor
Re: Problem while TKprof [message #395864 is a reply to message #395716] Thu, 02 April 2009 23:14 Go to previous messageGo to next message
sr_orcl
Messages: 82
Registered: January 2009
Location: mumbai
Member

My trace file is not generating.How to find out the trace file
Re: Problem while TKprof [message #395865 is a reply to message #395707] Thu, 02 April 2009 23:17 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Please, please, please Read & Follow Posting Guidelines above.
Go to the section labeled "Practice" & do as directed.
Previous Topic: Format Udump Trace Files
Next Topic: Import & Export utility
Goto Forum:
  


Current Time: Fri Dec 09 19:08:37 CST 2016

Total time taken to generate the page: 0.10602 seconds