- 論壇徽章:
- 0
|
<<關(guān)于怎樣產(chǎn)生statpack>;>;
下面以oracle816為例:<資料來源于Metalink>;
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知識來分析問題的所在,這能夠給你指出問題的大致所在,至于能否最終分析清楚問題是什么以及怎么解決就要看你的功底了。 |
|