手动生成AWR报告

发布时间:2020-07-29 23:49:49 作者:逛街的刀客
来源:网络 阅读:1511

        有时候数据库中为安装EM,无法图形化生成AWR报告,此时需要手工生成AWR报告,ORACLE提供了以个sql,可以手工生成AWR报告,首先创建生成报告的目录,这里为/home/oracle/AWR

$ mkdir AWR
$ cd AWR
$ pwd
/home/oracle/AWR

进入sqlplus

[oracle@ocp ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 30 02:41:04 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

执行脚本,?代表$ORACLE_HOME,@表示执行sql,默认提供两种报表格式,html和txt,默认为html格式

@?/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~

   DB Id    DB Name      Inst Num Instance
----------- ------------ -------- ------------
 1425858850 ORCL                1 orcl


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: html

选择从系统中抽取的报告的时间段,一般设7天就可以了,ORACLE会把七天内的报告都显示在屏幕上

Enter value for num_days: 7

Listing the last 7 days of Completed Snapshots

输入开始的snap id和结束的snap id,表示截取报告的时间段

Instance     DB Name        Snap Id    Snap Started    Level
------------ ------------ --------- ------------------ -----
orcl         ORCL                81 29 Dec 2015 13:33      1
                                 82 29 Dec 2015 15:00      1

                                 83 29 Dec 2015 16:00      1
                                 84 29 Dec 2015 17:00      1
                                 85 29 Dec 2015 18:00      1
                                 86 29 Dec 2015 19:00      1
                                 87 29 Dec 2015 20:00      1
                                 88 29 Dec 2015 21:00      1
                                 89 29 Dec 2015 22:00      1
                                 90 29 Dec 2015 23:00      1
                                 91 30 Dec 2015 00:00      1
                                 92 30 Dec 2015 01:00      1
                                 93 30 Dec 2015 02:00      1



Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 83
Begin Snapshot Id specified: 83

Enter value for end_snap: 93
End   Snapshot Id specified: 93

指定报告名称,如果不指定,直接回车,系统会按照屏幕提示名称生成报告名

Report written to awrrpt_1_83_93.html

下载到本地后查看就可以了

推荐阅读:
  1. oracle 10g 生成awr报告过程
  2. 如何使用awrrpt.sql 生成AWR报告

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

awr

上一篇:gcov 使用注意事项

下一篇:PoE供电交换机的四种连接方式

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》