Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Trace

Re: Oracle Trace

From: Papa Piquillo <oraclejva_at_yahoo.es>
Date: 13 Jul 2006 00:16:25 -0700
Message-ID: <1152774985.196926.259150@75g2000cwc.googlegroups.com>


Paul:
When the user logs and before running the report you have to activate the trace for the user. You have to query in v$session the sid , serial# for the user and then execute as sys

dbms_system.set_sql_trace_in_session ( sid , serial# , true)

After this you have a .trc file in user_dump_dest with the trace for the user.
Run the report or whatever you want to trace and then execute

dbms_system.set_sql_trace_in_session ( sid , serial# , false)

to deactivate the trace.
Then is time to analyze the trace with tkprof. You can run

tkprof file_in_user_dump_dest.trc trace.txt record=trace.sql

and you get a record of all the sql statements in the file trace.sql. You can have a look at trace.txt for more information. Hope this helps.
Bye. Received on Thu Jul 13 2006 - 02:16:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US