oracle手工收集awr报告_oracle 手动生成awr报告

Oracle AWR报告是分析数据库性能的关键工具。通过运行$ORACLE_HOME/rdbms/admin/awrrpt.sql脚本,选择报告类型(HTML或文本)、时间跨度和特定快照,可以生成报告。报告默认保存在当前目录,且详细列出数据库实例、快照时间以及性能指标。
摘要由CSDN通过智能技术生成

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值