Chapter 02-Diagnostic and Tuning Tools

1、Statspack(强大的分析和性能调优工具)

  • Installation of Statspack using the spcreate.sql script
  • Collection of statistics execute statspack.snap
  • Automatic collection of statistics using the spauto.sql script
  • Produce a report using the spreport.sql script
  • To collect timing information,set TIMED_STATISTICS = True

2、搭建statspack

View Code
1、创建一个表空间
create tablespace perfstat DATAFILE '/u01/oradata/DB202/perfstat_01.dbf' SIZE 512M;
2、执行安装statspack的命令
@?/rdbms/admin/spcreate.sql
PERFSTAT->oracle;
默认表空间:perfstat
临时表空间:temp
3、安装成功后,检查日志文件是否存在错误
/u01/oracle/spcpkg.lis
4、使用statspack

SQL> execute statspack.snap;

PL/SQL procedure successfully completed.

2次执行{execute statspack.snap;}时,中间不要有shutdown 命令;
5、执行报告
@?/rdbms/admin/spreport
按照命令提示,直接执行即可,直到执行成功完成;
执行完成后,还可以在/u01/oracle/目录下生成报告文件,查看详细内容;
6、StatsPack vedios on BBK
Digoal
视频编号:126912701270127112721279

 

posted @ 2013-03-31 16:46  ArcerZhang  阅读(147)  评论(0编辑  收藏  举报