Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Trace
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
![]() |
![]() |