Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1207157
  • 博文数量: 350
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 5668
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-23 17:53
文章分类

全部博文(350)

文章存档

2013年(350)

分类: Oracle

2013-04-27 09:58:53

2.2 生成指定实例的统计

  这项统计报表一般是针对多实例数据库,前面使用的脚本是生成数据库级别的统计报表,对于多实例的数据库,有时候DBA可能希望看到某个实例的表现,那么本脚本就能派上用场了。其实操作与上非常类似(都比较简单,需要DBA敲的字符加一块也没几个),注意执行的脚本不同的哟。

    SQL>@$ORACLE_HOME/rdbms/admin/awrrpti.sql

    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:

  此处需指定生成的报表格式,有txt和html两种选择,默认情况下为html格式。

    Type Specified: html

    Instances in this Workload Repository schema

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    DB Id Inst Num DB Name Instance Host

    ------------ -------- ------------ ------------ ------------

    948405229 2 JSSDB jssdbn2 jssdbn2

    * 948405229 1 JSSDB jssdbn1 jssdbn1

    Enter value for dbid:948405229

    Using 948405229 for database Id

    Enter value for inst_num:1

    Using 1 for instance number

  相比标准统计报表的生成,这里多了两个需指定的值,就是选择要生成报表的DBID以及实例的ID。

    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. Pressingwithout

    specifying a number lists all completed snapshots.

    Enter value for num_days:2

  指定要读取多少天内的快照信息。

    Listing the last 2 days of Completed Snapshots

    Snap

    Instance DB Name Snap Id Snap Started Level

    ------------ ------------ --------- ------------------ -----

    jssdbn1 JSSDB 235 22 Oct 2009 00:00 1

    236 22 Oct 2009 01:00 1

    237 22 Oct 2009 02:00 1

    238 22 Oct 2009 03:00 1

    239 22 Oct 2009 04:00 1

    240 22 Oct 2009 05:00 1

    241 22 Oct 2009 06:00 1

    242 22 Oct 2009 07:00 1

    243 22 Oct 2009 08:00 1

    244 22 Oct 2009 09:00 1

    245 22 Oct 2009 10:00 1

    246 22 Oct 2009 11:00 1

    247 22 Oct 2009 12:00 1

    248 22 Oct 2009 13:00 1

    249 22 Oct 2009 14:00 1

    250 22 Oct 2009 15:00 1

    251 22 Oct 2009 16:00 1

    252 22 Oct 2009 17:00 1

    253 22 Oct 2009 18:00 1

    254 22 Oct 2009 19:00 1

    255 22 Oct 2009 20:00 1

    256 22 Oct 2009 21:00 1

    257 22 Oct 2009 22:00 1

    258 22 Oct 2009 23:00 1

    259 23 Oct 2009 00:00 1

    260 23 Oct 2009 01:00 1

    261 23 Oct 2009 02:00 1

    262 23 Oct 2009 03:00 1

    263 23 Oct 2009 04:00 1

    264 23 Oct 2009 05:00 1

    265 23 Oct 2009 06:00 1

    266 23 Oct 2009 07:00 1

    267 23 Oct 2009 08:00 1

    Specify the Begin and End Snapshot Ids

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Enter value for begin_snap:

    .....................

    ......................

  剩下的步骤就与标准统计报表的步骤完全相同,这里就不重复演示了。

查看之前的文章:
==============================================

阅读(1884) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~