Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    78

    Unanswered: Collect statitics using statspack

    When i run the below script its giving below error.Could any one let me what is going wrong

    SQL> @d:\oracle\ora81\rdbms\admin\statsrep.sql
    SQL> Rem
    SQL> Rem $Header: statsrep.sql 01-nov-99.14:39:59 cdialeri Exp $
    SQL> Rem
    SQL> Rem statsrep.sql
    SQL> Rem
    SQL> Rem Copyright (c) Oracle Corporation 1999. All Rights Reserved.
    SQL> Rem
    SQL> Rem NAME
    SQL> Rem statsrep.sql
    SQL> Rem
    SQL> Rem DESCRIPTION
    SQL> Rem SQL*Plus command file to report on differences between
    SQL> Rem values recorded in two snapshots.
    SQL> Rem
    SQL> Rem NOTES
    SQL> Rem Usually run as the STATSPACK owner, PERFSTAT
    SQL> Rem
    SQL> Rem MODIFIED (MM/DD/YY)
    SQL> Rem cdialeri 11/01/99 - Enhance, 1059172
    SQL> Rem cgervasi 06/16/98 - Remove references to wrqs
    SQL> Rem cmlim 07/30/97 - Modified system events
    SQL> Rem gwood.uk 02/30/94 - Modified
    SQL> Rem densor.uk 03/31/93 - Modified
    SQL> Rem cellis.uk 11/15/89 - Created
    SQL> Rem
    SQL>
    SQL> clear break compute;
    SQL> repfooter off;
    SQL> ttitle off;
    SQL> btitle off;
    SQL> set timing off veri off space 1 flush on pause off termout on numwidth
    SQL> set echo off feedback off pagesize 60 linesize 78 newpage 2;


    DB Id DB Name Inst Num Instance
    ----------- ---------- -------- ----------
    3229116766 DEMO 1 demo
    Enter beginning Snap Id: 1
    Enter ending Snap Id: 20





    SQL> @d:\oracle\ora81\rdbms\admin\statsrep.sql
    SQL> Rem
    SQL> Rem $Header: statsrep.sql 01-nov-99.14:39:59 cdialeri Exp $
    SQL> Rem
    SQL> Rem statsrep.sql
    SQL> Rem
    SQL> Rem Copyright (c) Oracle Corporation 1999. All Rights Reserved.
    SQL> Rem
    SQL> Rem NAME
    SQL> Rem statsrep.sql
    SQL> Rem
    SQL> Rem DESCRIPTION
    SQL> Rem SQL*Plus command file to report on differences between
    SQL> Rem values recorded in two snapshots.
    SQL> Rem
    SQL> Rem NOTES
    SQL> Rem Usually run as the STATSPACK owner, PERFSTAT
    SQL> Rem
    SQL> Rem MODIFIED (MM/DD/YY)
    SQL> Rem cdialeri 11/01/99 - Enhance, 1059172
    SQL> Rem cgervasi 06/16/98 - Remove references to wrqs
    SQL> Rem cmlim 07/30/97 - Modified system events
    SQL> Rem gwood.uk 02/30/94 - Modified
    SQL> Rem densor.uk 03/31/93 - Modified
    SQL> Rem cellis.uk 11/15/89 - Created
    SQL> Rem
    SQL>
    SQL> clear break compute;
    SQL> repfooter off;
    SQL> ttitle off;
    SQL> btitle off;
    SQL> set timing off veri off space 1 flush on pause off termout on numwidth 10;
    SQL> set echo off feedback off pagesize 60 linesize 78 newpage 2;


    DB Id DB Name Inst Num Instance
    ----------- ---------- -------- ----------
    3229116766 DEMO 1 demo
    Enter beginning Snap Id: 1
    Enter ending Snap Id: 20




    Enter name of output file [st_1_20] : mohanstas


    ERROR: Database/Instance does not exist in STATS$DATABASE_INSTANCE


    ERROR: Begin Snapshot Id specified does not exist for this database/instance


    ERROR: End Snapshot Id specified does not exist for this database/instance


    WARNING: timed_statitics setting changed between begin/end snaps: TIMINGS ARE
    INVALID



    ERROR: Snaps chosen spanned an instance shutdown: RESULTS ARE INVALID


    ERROR: Session statistics are for different sessions: RESULTS ARE INVALID

    STATSPACK report for

    DB Name DB Id Instance Inst Num Release OPS Host
    ---------- ----------- ---------- -------- ---------- ---- ----------
    DEMO 3229116766 demo 1
    :ela := ;
    *
    ERROR at line 4:
    ORA-06550: line 4, column 17:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + mod not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string>
    The symbol "null" was substituted for ";" to continue.


    begin STATSPACK.STAT_CHANGES
    *
    ERROR at line 1:
    ORA-20100: Missing start value for statistic: db block changes
    ORA-06512: at "PERFSTAT.STATSPACK", line 590
    ORA-06512: at "PERFSTAT.STATSPACK", line 651
    ORA-06512: at line 1




    Cache Sizes
    ~~~~~~~~~~~
    db_block_buffers:
    db_block_size:
    log_buffer:
    shared_pool_size:

    ,' Redo size:' dscr, round(:rsiz/,2) val
    *
    ERROR at line 5:
    ORA-00936: missing expression



    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait Ratio:
    Buffer Hit Ratio:
    Library Hit Ratio:
    Redo NoWait Ratio:
    In-memory Sort Ratio:
    Soft Parse Ratio:
    Latch Hit Ratio:

    ŠSGA Memory Summary for DB: DEMO Instance: demo

    SGA regions Size in Bytes
    ------------------------------ ----------------
    ----------------
    sum
    -------------------------------------------------------------

    End of Report


    Thanks in advance
    mohan

  2. #2
    Join Date
    Jan 2003
    Posts
    10

    Re: Collect statitics using statspack

    Hi,

    what version of oracle do you use?

    It looks like 8.1.6... Right?

    After installing the statspack you have to collect at least 2 snapshots (using the procedure statspack.snap).

    regards

  3. #3
    Join Date
    Oct 2002
    Posts
    78
    Thanks for your reply.I able to got the statistics

    Regards
    mohan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •