oracle10g生成awr报告,生成oracle 10G的AWR报告

使用用户登录,打开终端出现$提示符。

$

使用Sqlplus连接Oracle实例(SID_NAME用实际实例名称替换)

$ORACLE_SID=SID_NAME

$export ORACLE_SID

$sqlplus / as sysdba

SQL>

运行$ORACLE_HOME/rdbms/admin/awrrpt.sql脚本,产生AWR报告。

SQL>@?/rdbms/admin/awrrpt.sql

Current Instance

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

DB IdDB NameInst Num Instance

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

2474782443 MOON1 MOON

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'

输入报告文件类型(html或者text)

Enter value for report_type:html

Type Specified:html

Instances in this Workload Repository schema

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

DB IdInst Num DB NameInstanceHost

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

* 24747824431 MOONMOONracdb2

Using 2474782443 for database Id

Using1 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 without

specifying a number lists all completed snapshots.

输入需要收集几天内的AWR信息

Enter value for num_days:7

Listing the last day's Completed Snapshots

Snap

InstanceDB NameSnap IdSnap StartedLevel

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

MOONMOON54 17 62010 09:31

9

55 17 62010 11:01

0

56 17 62010 12:01

0

57 17 62010 13:01

0

58 17 62010 16:51

0

59 17 62010 18:01

0

Specify the Begin and End Snapshot Ids

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

根据以上列出的快照号(SNAP ID)和快照时间,选择需要的分析的快照信息(begin_snap和end_snap)

Enter value for begin_snap:54

Begin Snapshot Id specified: 54

选择结束快照号

Enter value for end_snap:57

EndSnapshot Id specified: 57

Specify the Report Name

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

The default report file name is awrrpt_1_54_57.html.To use this name,

press to continue, otherwise enter an alternative.

输入生成报告的文件名称

Enter value for report_name:?/awrrpt.html

…..

退出sqlplus,回到$提示符。

SQL>exit

$

生成的文件位于$ORACLE_HOME目录

$cd $ORACLE_HOME

$ls –l awrrpt.html

使用ftp或者sftp工具将该文件下载到本地硬盘,进行分析。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值