oracle生成AWR报告方法

2018-04-02 19:59:42

在10g 11g中AWR自动的每隔一小时进行一次数据采集并生成快照。下面是生成AWR报告的步骤:

1:使用oracle用户在数据库服务器上执行如下命令

sqlplus  /  as sysdba

@$ORACLE_HOME/rdbms/admin/awrrpt.sql

 

2:Specify whether you want an HTML or a text report:

Enter value for report_type: html

 

3:Specify the number of days for which you want to list snapshot IDs.

指定显示几天的快照id(11g中AWR快照默认保留时间为8天)

Enter value for num_days: 2

回车后,就会出现2天以来的所有快照ID

 

4:Specify a beginning and ending snapshot ID for the workload repository report:

给负载库报表指定开始快照ID和结束快照ID(根据上面的显示选择1天跨度的开始ID和结束ID)

Enter value for begin_snap: 150    修改为自己的开始id

Enter value for end_snap: 160    修改为自己的结束id

 

5:Enter a report name, or accept the default report name:

输入报表名,或者不输入(oracle会生成一个默认名)

Enter value for report_name:

Using the report name /u01/awrrpt_1_150_160.html

这样就生成了一个名为:awrrpt_1_150_160.html的AWR报表文件了,该文件位于/u01下

 

posted @ 2018-04-02 20:04  浪里个小胖子  阅读(969)  评论(0编辑  收藏  举报