手动生成AWR报告

AWR是在10G开始引入的,在以前可以使用Statspack;AWR的前身就是Statspack;

手动生成AWR报告,可以使用$ORACLE_HOME/rdbms/admin/awrrpt.sql;linux貌似是在dbs目录

(1)用管理员账号登陆,sys

(2)所选快照距离现在的天数

(3)生成报表的起始快照编号

(4)生成报表的结束快照编号

(5)输入报表名称

--首先用sys登陆,可以去服务端登陆、也可以在客户端登陆、这里用的客户端
--windows在rdbms目录;linux貌似在dbs目录
SQL> @\\192.168.1.6\f$\oracle\product\10.2.0\db_1\RDBMS\ADMIN\awrrpt.sql

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

   DB Id    DB Name      Inst Num Instance
----------- ------------ -------- ------------
 1346908926 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'
输入 report_type 的值:html
---这里输出html格式的数据
Type Specified:  html

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

   DB Id     Inst Num DB Name      Instance     Host
------------ -------- ------------ ------------ ------------
* 1346908926        1 ORCL         orcl         SYOA20130626

Using 1346908926 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.

--这里显示最近7天的快照信息
输入 num_days 的值:7


<<中间会显示一些快照信息、这里省略........>>

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--输入开始快照ID;可以从上面省略的输出信息查看
输入 begin_snap 的值:  547
Begin Snapshot Id specifie

--输入结束快照ID;可以从上面省略的输出信息查看
输入 end_snap 的值:  703
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_547_703.html.  To use this name,
press <return> to continue, otherwise enter an alternative.

--输入保存的文件路径;如果采用的客户端登陆,就写客户端的路径;否则就写服务端的路径
输入 report_name 的值:C:\123456.html

--------------------------------------------下面是输出的示例报告--------------------------------------------------------------------------------------

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值