51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 3331|回复: 0
打印 上一主题 下一主题

生成AWR报告的完整过程

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-7-14 21:23:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Oracle 9i下,使用statspack生成性能报告。
Oracle 10g下,使用AWR生成性能报告,AWR报告需通过sys账户来生成。一个示例如下:

[oracle@testserver admin]$ pwd
/oracle/product/10g/rdbms/admin
[oracle@testserver admin]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 3月 18 09:33:44 2010

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

SQL> connect /as sysdba
已连接。
SQL> @awrrpt

Current Instance
~~~~~~~~~~~~~~~~

   DB Id    DB Name      Inst Num Instance
----------- ------------ -------- ------------
1986166942 KMS                 1 kms


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'
输入 report_type 的值: text

Type Specified:  text


Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   DB Id     Inst Num DB Name      Instance     Host
------------ -------- ------------ ------------ ------------
* 1986166942        1 KMS          kms          testserver

Using 1986166942 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 <return> without
specifying a number lists all completed snapshots.


输入 num_days 的值:  5

Listing the last 5 days of Completed Snapshots

                                                        Snap
Instance     DB Name        Snap Id    Snap Started    Level
------------ ------------ --------- ------------------ -----
kms          KMS               6634 14 3月  2010 00:00     1
                               6635 14 3月  2010 01:00     1
                               6636 14 3月  2010 02:00     1
                               6637 14 3月  2010 03:00     1
                               6638 14 3月  2010 04:00     1
                               6639 14 3月  2010 05:00     1
                               6640 14 3月  2010 06:00     1
                               6641 14 3月  2010 07:00     1
                               6642 14 3月  2010 08:00     1
                               6643 14 3月  2010 09:00     1
                               6644 14 3月  2010 10:00     1
                               6645 14 3月  2010 11:01     1
                               6646 14 3月  2010 12:01     1
                               6647 14 3月  2010 13:00     1
                               6648 14 3月  2010 14:00     1
                               6649 14 3月  2010 15:00     1
                               6650 14 3月  2010 16:00     1
                               6651 14 3月  2010 17:00     1
                               6652 14 3月  2010 18:00     1
                               6653 14 3月  2010 19:00     1
                               6654 14 3月  2010 20:00     1
                               6655 14 3月  2010 21:00     1
                               6656 14 3月  2010 22:00     1
                               6657 14 3月  2010 23:00     1
                               6658 15 3月  2010 00:00     1
                               6659 15 3月  2010 01:00     1
                               6660 15 3月  2010 02:00     1
                               6661 15 3月  2010 03:00     1
                               6662 15 3月  2010 04:00     1
                               6663 15 3月  2010 05:00     1
                               6664 15 3月  2010 06:00     1
                               6665 15 3月  2010 07:00     1
                               6666 15 3月  2010 08:00     1
                               6667 15 3月  2010 09:00     1
                               6668 15 3月  2010 10:00     1
                               6669 15 3月  2010 11:00     1
                               6670 15 3月  2010 12:00     1
                               6671 15 3月  2010 13:00     1
                               6672 15 3月  2010 14:00     1
                               6673 15 3月  2010 15:00     1
                               6674 15 3月  2010 16:00     1
                               6675 15 3月  2010 17:00     1
                               6676 15 3月  2010 18:00     1
                               6677 15 3月  2010 19:00     1
                               6678 15 3月  2010 20:01     1
                               6679 15 3月  2010 21:01     1
                               6680 15 3月  2010 22:01     1
                               6681 15 3月  2010 23:00     1
                               6682 16 3月  2010 00:00     1
                               6683 16 3月  2010 01:00     1
                               6684 16 3月  2010 02:00     1
                               6685 16 3月  2010 03:00     1
                               6686 16 3月  2010 04:00     1
                               6687 16 3月  2010 05:00     1
                               6688 16 3月  2010 06:00     1

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
输入 begin_snap 的值:  
6634
Begin Snapshot Id specified: 6634

输入 end_snap 的值:  6681
End   Snapshot Id specified: 6681



Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_6634_6681.txt.  To use this name,
press <return> to continue, otherwise enter an alternative.

输入 report_name 的值:  

<此部分内容为生成的awrrpt报告的内容>

End of Report
Report written to awrrpt_1_6682_6739.txt
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏

相关帖子

回复

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-5-7 01:34 , Processed in 0.069890 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表