Home » RDBMS Server » Server Administration » tkprof question
tkprof question [message #57049] Fri, 16 May 2003 14:10 Go to next message
Sankar B. Mandalika
Messages: 20
Registered: November 2002
Junior Member
Hi,

I am running tkprof on a slow query. Here is what I am doing.

SQL> alter session set sql_trace=true;
SQL> run query via a script
SQL> quit;

I need to do this from the client as I do not have access to the server. Where would the .trc file be located? And would I have access to the tkprof utility from the client?

Thanks,
Sankar.
Re: tkprof question [message #57050 is a reply to message #57049] Fri, 16 May 2003 15:57 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
the output of tkprof is placed in the location determined by  USER_DUMP_DEST in server only.
what exactly are u trying to do?
If you are looking into performance related issues, to some extent u can use explain plan or autotrace 

mag@itloaner1_local > @c:oracleora81rdbmsadminutlxplan.sql

Table created.

mag@itloaner1_local > set autotrace on
mag@itloaner1_local > select * from dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE
   1    0   TABLE ACCESS (FULL) OF 'DEPT'

Statistics
----------------------------------------------------------
          0  recursive calls
          4  db block gets
          2  consistent gets
          0  physical reads
          0  redo size
        678  bytes sent via SQL*Net to client
        424  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          4  rows processed

mag@itloaner1_local > 

Re: tkprof question [message #57056 is a reply to message #57049] Sat, 17 May 2003 13:27 Go to previous messageGo to next message
sai sreenivas jeedigunta
Messages: 370
Registered: November 2001
Senior Member
the trace file is created in the user_dump_dest location.
It will be loacated in the server.
you can normally open the oracleadmindb_nameudump
folder and find the last created file.
with either ls -ltr or in NT u can arrange icons by date
you can open the .trc file with notepad / vi and see if it contains the Query u had given. Once it contains your query that is your trace file.
then use the TKPROF utility as follows.
c:>tkprof <
> <<outputfile>> <<[[explain=Y]]>>
Ex:

c:> tkprof d;oracleadminprinceudumpora08903.trc c:output.txt explain=y


then you can open the c:output.txt and start diagnosing.

sai
Re: tkprof question [message #57057 is a reply to message #57049] Sat, 17 May 2003 13:28 Go to previous message
sai sreenivas jeedigunta
Messages: 370
Registered: November 2001
Senior Member
the trace file is created in the user_dump_dest location.
It will be loacated in the server.
you can normally open the oracleadmindb_nameudump
folder and find the last created file.
with either ls -ltr or in NT u can arrange icons by date
you can open the .trc file with notepad / vi and see if it contains the Query u had given. Once it contains your query that is your trace file.
then use the TKPROF utility as follows.
c:>tkprof tracefile outputfile [[explain=Y]]
Ex:

c:> tkprof d;oracleadminprinceudumpora08903.trc c:output.txt explain=y


then you can open the c:output.txt and start diagnosing.

sai
Previous Topic: What version of Oracle is right for Win XP
Next Topic: DBMS/RDBMS
Goto Forum:
  


Current Time: Mon Dec 30 17:37:35 CST 2024