关于怎样产生statpack

发表于:2007-06-22来源:作者:点击数: 标签:
关于怎样产生statpack 下面以 oracle 816为例: A)Toinstallthepackage,using SQL *PlusandbasedonthecorrectplatformandRDBMSversion,dothefollowing: Oracle 8.1.6: on Unix : SQLconnect/assysdba SQL@?/rdbms/admin/statscre B)Thesimplestinteractivewa

   
<<关于怎样产生statpack>>
  下面以oracle816为例:

A)  To install the package, using SQL*Plus and based on the correct platform and RDBMS version, do the following:
        Oracle 8.1.6:
            on Unix:
            SQL>  connect / as sysdba
            SQL>  @?/rdbms/admin/statscre
B)The simplest interactive way to take a snapshot is to login to SQL*Plus as the PERFSTAT user, and execute the procedure statspack.snap:
     e.g.
       SQL>connect perfstat/perfstat
       SQL>execute statspack.snap;
  wait 10-30 minutes  then execute this again
C)Running the report
  To examine the change in statistics between two time periods, the statsrep.sql file is executed while being connected to the PERFSTAT user.  The statsrep.sql command file is located in the rdbms/admin directory of the Oracle Home.

 Note:  In an OPS environment you must connect to the instance you wish to report on - this restriction may be removed in future releases.
  You will be prompted for:
    1. The beginning snapshot Id
    2. The ending snapshot Id
    3. The name of the report text file to be created

    Oracle 8.1.6:
        on Unix:
           SQL>  connect perfstat/perfstat
           SQL>  @?/rdbms/admin/statsrep
        on NT:
           SQL>  connect perfstat/perfstat
           SQL>  @%ORACLE_HOME%\rdbms\admin\statsrep
 这样就可以你掌握的Oracle知识来分析问题的所在,这能够给你指出问题的大致所在,至于能否最终分析清楚问题是什么以及怎么解决就要看你的功底了。

原文转自:http://www.ltesting.net