AWR(Automatic Workload Repository)报告是我们进行日常数据库性能评定、问题SQL发现的重要手段
调用脚本,生成文件(程序脚本一般保存在$ORACLE_HOME下的rdbms/admin中,名称为awrrpt.sql)
SQL> @?/rdbms/admin/awrrpt.sql
输入报告参数
--默认类型html
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type:
--选择awr报告时间跨度(一般会保存1个月左右)
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1397953534 1 DEV dev tts.oradg
Using 1397953534 for database Id
Using 1 for instance number
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing without
specifying a number lists all completed snapshots.
Enter value for num_days:
--选择开始和结束的快照(快照默认1个小时生成一个)
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
dev DEV 19073 19 Sep 2017 00:00 1
19074 19 Sep 2017 01:00 1
19075 19 Sep 2017 02:00 1
19076 19 Sep 2017 03:00 1
19077 19 Sep 2017 04:00 1
19078 19 Sep 2017 05:00 1
19079 19 Sep 2017 06:00 1
19080 19 Sep 2017 07:00 1
19081 19 Sep 2017 08:00 1
19082 19 Sep 2017 09:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:
Enter value for end_snap:
--默认awr报告文件名(awrrpt_inst_beginscapid_endscapid.html)
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_19073_19082.html. To use this name,
press to continue, otherwise enter an alternative.
Enter value for report_name:
生成完成,在进入命令行的当前目录下可以看到生成的awr文件
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
https://www.cndba.cn/asker/article/2237
版权声明:本文为博主原创文章,未经博主允许不得转载。
awr