oracle 10g awr性能分析工具的用法

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:539

oracle 10g awr性能收集工具的用法

oracle 10g addm工具根据awr收集的信息能给出个解决方案,以下是awr脚本的用法
和statspack工具差不多。
C:\Documents and Settings\Administrator>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 2月 5 11:52:18 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> @?/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1199626219 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 的值: text
Type Specified: text

Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1199626219 1 ORCL orcl PRIMARY
* 1199626219 1 ORCL orcl RAC1
* 1199626219 1 ORCL orcl STANDBY
Using 1199626219 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 without
specifying a number lists all completed snapshots.

输入 num_days 的值: 4
Listing the last 4 days of Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
orcl ORCL 25 03 2月 2009 13:53 1
26 03 2月 2009 15:00 1
27 03 2月 2009 16:00 1
28 03 2月 2009 16:05 1
29 03 2月 2009 16:06 1
30 03 2月 2009 16:07 1
31 03 2月 2009 16:09 1
32 03 2月 2009 17:00 1
33 05 2月 2009 09:42 1

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

Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_28_29.txt. To use this name,
press to continue, otherwise enter an alternative.
输入 report_name 的值:d:\awrrpt_1_28_29.txt 即可
通过以下视图可以查出,做快照的间隔时间和保留多长时间
select snap_interval, retentionfrom dba_hist_wr_control;SNAP_INTERVAL RETENTION------------------- -------------------+00000 01:00:00.0 +00007 00:00:00.0
这些 SQL 语句显示快照每小时采集一次,采集的数据保留 7 天。要修改设置 [i]— 例如,快照时间间隔为 30 分钟,保留时间为三天 [i]— 您可以发出以下命令。参数以分钟为单位。

begin dbms_workload_repository.modify_snapshot_settings ( interval => 30, retention => 3*24*60 );end;具体awr报告比statspack报告多了很多东西出来,还有待具体研究

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】