linux数据库awr报告,手动生成AWR报告

有时候数据库中为安装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

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

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值