通过ASH诊断性能

除了“手工”诊断分析Oracle性能,也可以通过Oracle提供的各类工具来快速的进行分析诊断。

尤其是Oracle10g以来,采用工具的特性更强大及方便。接下来介如何利用ASH工具来诊断分析,生成ASH报告有两种方式:

1、脚本方式:

执行$ORACLE_HOME/rdbms/admin/ashrpt.sql脚本

[dbserv1]@dbserv-db1[/export/home/oracle/awr_dir]$sqlplus / as sysdba

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

Current Instance

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

DB Id DB Name Inst Num Instance

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

3747980894 dbserv 1 dbserv1

[@more@]

Specify the Report Type

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

Enter 'html' for an HTML report, or 'text' for plain text

Defaults to 'html'

Enter value for report_type:

Type Specified: html

Instances in this Workload Repository schema

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

DB Id Inst Num DB Name Instance Host

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

3747980894 1 dbserv dbserv boss-dis1

* 3747980894 1 dbserv dbserv1 dbserv-db1

Defaults to current database

Using database id:

3747980894

Defaults to current instance

Using instance number:

1

ASH Samples in this Workload Repository schema

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

Oldest ASH sample available: 09-Jun-12 07:04:06

[ 50795 mins in the past]

Latest ASH sample available: 14-Jul-12 13:38:43

[ 0 mins in the past]

Specify the timeframe to generate the ASH report

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

Enter begin time for report:

-- Valid input formats:

-- To specify absolute begin time:

-- [MM/DD[/YY]] HH24:MI[:SS]

-- Examples: 02/23/03 14:30:15

-- 02/23 14:30:15

-- 14:30:15

-- 14:30

-- To specify relative begin time: (start with '-' sign)

-- -[HH24:]MI

-- Examples: -1:15 (SYSDATE - 1 Hr 15 Mins)

-- -25 (SYSDATE - 25 Mins)

Defaults to -15 mins

Enter value for begin_time: 13:20

Report begin time specified: 13:20

Enter duration in minutes starting from begin time:

Defaults to SYSDATE - begin_time

Press Enter to analyze till current time

Enter value for duration:

Report duration specified:

Using 14-Jul-12 13:20:00 as report begin time

Using 14-Jul-12 13:39:03 as report end time

Specify Slot Width (using ashrpti.sql) for 'Activity Over Time' section

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

-- Explanation:

Specify the Report Name

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

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

press to continue, otherwise enter an alternative.

Enter value for report_name:

Using the report name ashrpt_1_0714_1339.html

Summary of All User Input

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

Format : HTML

DB Id : 3747980894

Inst num : 1

Begin time : 14-Jul-12 13:20:00

End time : 14-Jul-12 13:39:03

Slot width : Default

Report targets : 0

Report name : ashrpt_1_0714_1339.html

如下为所生成的HTML格式的报告,如果下载该文件不太方便的话,也可以从如下

...

转载于:http://blog.itpub.net/18841027/viewspace-1058814/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值