Wednesday, October 3, 2012

TK Prof Sample Stetps





TKPROF STEPS

1)      alter session set timed_statistics=true;
2)      alter session max_dump_file_size=unlimited;
3)      alter user_dump_dest=/oracle/admin/ora10g/udump
4)      alter session set max_dump_file_size=unlimited;
5)      alter session set sql_trace=true;
6)      SQL> exec buildCalcCurrent(15);  (here execute procedure or query)
7)      Obtain the number included in the trace filename
select spid,s.Sid,s.serial#,p.username,p.program
FROM v$PROCESS P,V$SESSION S
WHERE P.ADDR=S.PADDR
----AND S.SID=(SELECT SID FROM V$MYSTAT WHERE ROWNUM=1)
8)      TKPROF C:\xe_ora_3732.trc C:\xe_ora_3732_RFRMT.TXT EXPLAIN=SYSTEM/MANAGER (IF NEEDED THIS ALSO INCLUDE sort=(FCHCPU,EXECPU,PRSCPU) PRINT=5)


No comments :

Post a Comment