一.生成AWR报告
[ractest
@sun880
-
1
/
u01
/
app
/
oracle
/
orahome
/
rdbms
/
admin]$ cd
$ORACLE_HOME
/
rdbms
/
admin
[ractest @sun880 - 1 / u01 / app / oracle / orahome / rdbms / admin]$ sqlplus / as sysdba
SQL * Plus : Release 10.2 . 0.4 . 0 - Production on Sun Jan 27 20 : 47 : 38 2008
Copyright (c) 1982 , 2007 , Oracle . All Rights Reserved .
Connected to :
Oracle Database 10g Enterprise Edition Release 10.2 . 0.4 . 0 - 64bit Production
With the Partitioning , Real Application Clusters , OLAP , Data Mining
and Real Application Testing options
SQL > @awrrpt
......
// 根据Oracle提示生成报告 ......
[ractest @sun880 - 1 / u01 / app / oracle / orahome / rdbms / admin]$ sqlplus / as sysdba
SQL * Plus : Release 10.2 . 0.4 . 0 - Production on Sun Jan 27 20 : 47 : 38 2008
Copyright (c) 1982 , 2007 , Oracle . All Rights Reserved .
Connected to :
Oracle Database 10g Enterprise Edition Release 10.2 . 0.4 . 0 - 64bit Production
With the Partitioning , Real Application Clusters , OLAP , Data Mining
and Real Application Testing options
SQL > @awrrpt
......
// 根据Oracle提示生成报告 ......
注:报告生成在$ORACLE_HOME/rdbms/admin/目录下。
二.修改awr的默认设置
//
半小时采集一次,采集信息保存3天。
SQL > exec dbms_workload_repository . modify_snapshot_settings (interval => 30 , retention => 3 * 24 * 60 );
SQL > exec dbms_workload_repository . modify_snapshot_settings (interval => 30 , retention => 3 * 24 * 60 );
三.关闭AWR自动收集
SQL
>
exec
dbms_workload_repository
.
modify_snapshot_settings (interval
=>
0
,
retention
=>
24
*
60
);
注:10g默认是自动开启awr信息收集的,会对系统有一定的影响(很小);如果要关闭awr信息收集,只需设置interval参数为0即可。但interval设0后,AWR报告无法生成。
本文转自hyddd博客园博客,原文链接:http://www.cnblogs.com/hyddd/archive/2009/10/31/1593658.html,如需转载请自行联系原作者。