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
TKPROF
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
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
-
- Posts: 1
- Joined: Mon Jun 18, 2007 12:43 am
- Location: India
-
- Posts: 13
- Joined: Mon Jun 25, 2007 4:38 am
- Location: India
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.
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.
Who is online
Users browsing this forum: No registered users and 2 guests