最快速STATSPACK使用指南,实用手册
安装statspack SQL>connect / as sysdba
SQL>@?/rdbms/admin/spcreate
卸载
SQL>connect / as sysdba SQL>@?/rdbms/admin/spdrop
/* 收集信息前把timed_statistics = true; alter system set timed_statistics = true; */
收集信息
SQL>connect perfstat/perfstat SQL>execute statspack.snap;
自动收集 SQL>connect perfstat/perfstat SQL>@?/rdbms/admin/spauto
删掉自动收集的job.
SQL>select * from user_jobs;
SQL>exec dbms_job.remove(JOB_ID) /* execute statspack.snap(i_snap_level=>10, i_modify_parameter=>'true'); Levels = 5 Additional data: SQL Statements Levels = 6 This level includes all statistics gathered in the lower level(s).
Levels = 7 segments level statistics Levels = 10 Additional statistics: Child latches i_modify_parameter=>'true'/'false' 决定是否保存level 的值,下一次执行继续使用 */
产生报告
SQL>conect perfstat/perfstat SQL>@?/rdbms/admin/spreport
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17252115/viewspace-735371/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/17252115/viewspace-735371/