Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Trace
Papa Piquillo wrote:
> 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.
Another possibility is to install the DBMS_SUPPORT built-in package documented in Morgan's Library at www.psoug.org.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Jul 13 2006 - 11:26:08 CDT
![]() |
![]() |