博客首页 » Oracle AWR报告最简单制作方法
发布于 23 Jun 2014 03:00
标签 blog
论坛上又有人问Oracle AWR报告最简单制作方法,其实手册上写得很明白
AWR报告的机制是这样
- Oracle按照自动定时收集的DB动态统计信息的Snapshot
- 分析于两个Snapshot之间的变化可以得到DB动态使用信息
- 对于这个信息可以生成一个DB使用情况报告
- 这个报告对于诊断DB性能有很大帮助
我们需要指定一个开始snap号,一个结束snap号,为了知道哪个snap号是需要的,awr可以列出最近几天的snap号和时间.
所以流程就是这样的:
用sqlplus登入DB,输入
@$ORACLE_HOME/rdbms/admin/awrrpt.sql
问report_type输入text或html
Enter value for report_type: text
问num_days输入想查看ID的天数
Enter value for num_days: 2
问begin_snap输入上面看到的开始的ID号码
Enter value for begin_snap: 150
问begin_snap输入上面看到的结束的ID号码
Enter value for end_snap: 160
问report_name输入想生成的报告文件名,或者直接输入回车,Oracle会自动生成一个文件名
Enter value for report_name:
Using the report name awrrpt_1_150_160
Reference:
http://docs.oracle.com/cd/E11882_01/server.112/e41573/autostat.htm#PFGRF94203
5.3.6.1 Generating an AWR Report
The awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot IDs.
To generate an AWR report:
At the SQL prompt, enter:
@$ORACLE_HOME/rdbms/admin/awrrpt.sql
Specify whether you want an HTML or a text report:Enter value for report_type: text
In this example, a text report is chosen.Specify the number of days for which you want to list snapshot IDs.
Enter value for num_days: 2
A list of existing snapshots for the specified time range is displayed. In this example, snapshots captured in the last 2 days are displayed.Specify a beginning and ending snapshot ID for the workload repository report:
Enter value for begin_snap: 150
Enter value for end_snap: 160
In this example, the snapshot with a snapshot ID of 150 is selected as the beginning snapshot, and the snapshot with a snapshot ID of 160 is selected as the ending snapshot.Enter a report name, or accept the default report name:
Enter value for report_name:
Using the report name awrrpt_1_150_160
In this example, the default name is accepted and an AWR report named awrrpt_1_150_160 is generated.
本页面的文字允许在知识共享 署名-相同方式共享 3.0协议和GNU自由文档许可证下修改和再使用,仅有一个特殊要求,请用链接方式注明文章引用出处及作者。请协助维护作者合法权益。
系列文章
文章列表
- Oracle AWR报告最简单制作方法
这篇文章对你有帮助吗,投个票吧?
留下你的评论