<<关于怎样产生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知识来分析问题的所在,这能够给你指出问题的大致所在,至于能否最终分析清楚问题是什么以及怎么解决就要看你的功底了。