Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Trace SQL statements executed
Yes, you can translate the trace file using tkprof, an Oracle utility. The
syntax of the command is:
$tkprof trace.trc report.txt (sys=no)
You should see in report.txt each SQL takes how much CPU and I/O in a
readable format.
Set timed_statistics=true before generate the trace file will make the
report more informational.
For detail information about tkprof, type tkprof help=y, or read Oracle
documents.
Michael.
Keith Shum <kshum_at_iLux.com> wrote in message
news:7mjbgq$18a$1_at_nnrp1.deja.com...
> Thanks for the replying, I tried the statements, and then I found the
> column "PREV_SQL" has a value as "83A3B72C", so does it mean that the
> string actually is the alias of the sql statement?
> Anywhere I can do a translate?
> Thanks!
>
> In article <931982111.5086.0.pluto.d4ee154e_at_news.demon.nl>,
> "Sybrand Bakker" <postmaster_at_sybrandb.nospam.demon.nl> wrote:
> > From a post by Tim Lange, of yesterday
> > If the session already exists, go to v$session and get the sid and the
> > serial# of the session you are interested in.
> > .
> > Then, using sqlplus, as "sys" unless you granted additional authority,
> >
> > execute dbms_system.set_sql_trace_in_session(sid, ser, TRUE);
> >
> > when finished
> >
> > execute dbms_system.set_sql_trace_in_session(sid, ser, FALSE);
> >
> > Hth,
> >
> > Sybrand Bakker, Oracle DBA
> >
> > Keith Shum <kshum_at_iLux.com> wrote in message
> > news:7mikme$o2u$1_at_nnrp1.deja.com...
> > > Hi, there,
> > >
> > > Currently I have a problem with a client product which will
> import
> > > tons of data into Oracle8 database. However, during importing in
> the
> > > middle, it stopped. Does anyone know how to turn on the trace mode
> that
> > > will log down every SQL statement executed by the client from the
> > > database server side?
> > >
> > > Since I have heard about the "CPU Spin"-kind of SQL statements
> that
> > > will execute forever and never return anything. I would like to do
> a
> > > debug to see which statement is having problem. However, I cannot
> > > execute them one by one by hand.
> > >
> > > Thank you!
> > >
> > >
> > >
> > > --
> > > **********
> > > Keith Shum @>~>~
> > > kshum_at_iLux.com
> > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Share what you know. Learn what you don't.
> >
> >
>
> --
> **********
> Keith Shum @>~>~
> kshum_at_iLux.com
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Wed Jul 14 1999 - 22:12:03 CDT