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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: STATSPAK Question

Re: STATSPAK Question

From: Juan Carlos Reyes Pacheco <juancarlosreyesp_at_gmail.com>
Date: Fri, 18 Feb 2005 17:26:47 -0400
Message-ID: <cd4305c105021813262bf8a19a@mail.gmail.com>


Hi bunjibry

This should be as short as possible, because you can mix data (from different process), and some data can average. Now if the process you want to check takes 3 hours then you have to take 3 hours.

If this only a session or report or process the problem, try first to generate a trace file.

If you want to get the most from statspack don't forget snap level EXECUTE STATSPACK.SNAP(i_snap_level=>7);

Remember most of the problems you will solve using trace files, you fix process by process , I see statpacks to keep a track of your performance from time to time, and to do an overall diagnostic or tuning, to find problem, once you finde something you will have to get a trace file anyway

Compare, try using statpacks and try using trace, you 'll see which helps you more. I think statpacks is not used too frequently, at least for me.

CREATE OR REPLACE TRIGGER SYS.TGR_ENABLE_TRACE  AFTER
 LOGON
 ON DATABASE
BEGIN
 IF USER = 'CACHITO' THEN

  EXECUTE IMMEDIATE 'alter session set TIMED_STATISTICS=TRUE';
  EXECUTE IMMEDIATE 'alter session set STATISTICS_LEVEL=ALL';
  EXECUTE IMMEDIATE 'alter session set max_dump_file_size=UNLIMITED';
  EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS ''10046 TRACE NAME
CONTEXT FOREVER, LEVEL 12''';
  EXECUTE IMMEDIATE 'alter session set sql_trace=true';   EXECUTE IMMEDIATE 'alter session set TRACEFILE_IDENTIFIER='''||USER||'''';  END IF;
END;
/.
TKPROF \sbbv_ora_740.trc C:\revisar.TXT SORT=PRSELA,EXEELA,FCHELA Revisar el archivo C:\revisar.TXT
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 18 2005 - 16:36:20 CST

Original text of this message

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