TKPROF

In this forum you can share stuff related to Oracle 11g, 10g, 9i.
Post Reply
anu_uma
Posts: 456
Joined: Sat Feb 03, 2007 4:39 am
Location: India
Contact:

TKPROF

Post by anu_uma »

Hi all,

can anyone suggest me the uses and advantages of tkprof ( transient kernel profiler) and how to enable the SQL TRACE for an apps instance ???

I am not a technical person, so i need step by step explanation to do the SQL trace for an apps instance.

Regards,
Uma
ramasrith
Posts: 14
Joined: Tue Mar 13, 2007 1:10 am
Location: India

Post by ramasrith »

hai anu,
first of all generate the trace file from the sql prompt
sql>alter session set sql_trace=true;
sql>select * from emp (take any table);
sql> show parameter user_dump
(Then it will show the user generated file location. Go to that location fr om OS user and type )

ls -ltr

select the last generated .trc file and type at the os level as

tkprof <filename.trc> <xyz.txt>
(filename.trc ---> generated trace file)
(xyz.txt ---> any filename)

vi xyz.txt
(u can view info as a readable form when u compare with .trc file
u can know all the info whats goingon inside the table when u issue a query)


Thank u ,
Ramu
anu_uma
Posts: 456
Joined: Sat Feb 03, 2007 4:39 am
Location: India
Contact:

Post by anu_uma »

Hi Ram,

Thanks for the detail explanation. Definetly someone will get benefited of your stuff.
pvsrskishore
Posts: 1
Joined: Mon Jun 18, 2007 12:43 am
Location: India

Post by pvsrskishore »

Hai anu,

This is ramu's frnd kishore. Actually this is not even related to technical. This is done by DBA's. So it may not be useful for Functional or technical folks. But its gud to know.

Bye..

Nani
anu_uma
Posts: 456
Joined: Sat Feb 03, 2007 4:39 am
Location: India
Contact:

Post by anu_uma »

Hi,

Thanks for the clarifications... few places DBA's involvement is more and in few places technical handles these sort of things....

as per my exp, only technical people have been using TKProf - to apply patches, to run sql queries to take output for TAR's
anu_uma
Posts: 456
Joined: Sat Feb 03, 2007 4:39 am
Location: India
Contact:

Post by anu_uma »

Hi Kishore,

Are U a DBA ???



[quote]Hai anu,

This is ramu's frnd kishore. Actually this is not even related to technical. This is done by DBA's. So it may not be useful for Functional or technical folks. But its gud to know.

Bye..

Nani

<i><div align="right">Originally posted by pvsrskishore
ramaraomovva
Posts: 13
Joined: Mon Jun 25, 2007 4:38 am
Location: India

Post by ramaraomovva »

Hi,

TKPROF : - It is a utility provided by oracle that formats SQL Trace files
into veru helpfull and readable reports. It is installed when
the database server software is installed.
Enabling SQL Trace: - AT THE INSTANCE LEVEL
SQL_TRACE = TRUE
TIMED_STATISTICS = TRUE(OPTINAL)
and
IN YOUR SESSION
ALTER SESSION SET SQL_TRACE = TRUE
IN ANOTHER SESSION
SYS.DBMA_SYSTEM.SET_SQL_TRACE_IN_SESSION
(<SID>, <SERIAL#>, TRUE)
and INVOKE TKPROF FROM THE OPERATING SYSTEM PROMPT LIKE THIS

TKPROF<TRACEFILE><OUTPUT FILE>\[EXPLAIN = <USERNAME/PW>]\
[SYS = N][INSERT = <FILENAME>]\[RECORD=<FILENAME>]
[SORT = <KEYWORD>]

bye.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests