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: SQL trace facility

Re: SQL trace facility

From: - <Ardiels_at_umfolozi.ntech.ac.za>
Date: 1997/08/11
Message-ID: <5sn110$p8d@Raven.und.ac.za>#1/1

In article <33E5F94F.3488815E_at_ncl.ac.uk> Steven Christopher Charles Grant <S.C.C.Grant_at_ncl.ac.uk> wrote:
> Hi
>
> When using SQL Trace Facility, there are two initialization parameters
> which I am having trouble with.
>
> 1. How do I enable the TIMED_STATISTICS parameter to TRUE?
>
> 2. After enabling the trace facility to true, the manual says Oracle
> generates a trace file containing statistics. Oracle writes these trace
> files to the user dump destination. How do I find out the name of a
> trace file so that I can run TKPROF?
>
> THANKS
>
> Steven Grant
>

Hi Steven.

  1. The parameter TIMED_STATISTICS is an initialisation parameter which is set in your database initialisation file. Generally, the initialisation file is named with the syntax: init<dbname>.ora So, in the file named init<dbname>.ora type : TIMED_STATISTICS = TRUE
  2. Try this: 2.1 SQL>alter session set sql_trace=true; SQL>@enter_your_query.sql SQL>alter session set sql_trace=false;

   This will automatically create your trace file.

   2.2. The trace file will be found in the directory for your

        user dump destination.

        Check your init.ora file for your user dump destination.

   2.3. Once in your udump directory, at the UNIX prompt type:

        $ls -lt

        which will list the files in date order, with the latest file
        listed first.

   2.4. Your trace file will have the naming syntax: ora_<some_number>.trc.

   2.5 Now run the TKPROF utility against your trace file to

        produce the desired readable output. Received on Mon Aug 11 1997 - 00:00:00 CDT

Original text of this message

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