oracle AWR深入研究分析,如何使用
AWR的前身是statspack,当然现在还在,只不过大家都在使用AWR,因为它方便,简单,直观,形象。
AWR是oracle内置工具,安装oracle时已经自动安装完毕,无需额外安装了。
SELECT *
FROM DBA_HIST_WR_CONTROL;
这里主要查看AWR策略的制定信息,多久抓一次快照,保留多长时间。
DECLARE
BEGIN
DBMS_WORKLOAD_REPOSITORY.modify_snapshot_settings (
interval => 30,
retention => 10 * 24 * 60);
END;
修改策略信息
如何生成AWR报表信息:
依赖于awrrpt.sql脚本,该脚本的路径是$oracle_home/RDBMS/ADMIN
该脚本的内容如下:
Rem $Header: awrrpt.sql 24-oct-2003.12:04:53 pbelknap Exp $
Rem
Rem awrrpt.sql
Rem
Rem Copyright (c) 1999, 2003, Oracle Corporation. All rights reserved.
Rem
Rem NAME
Rem awrrpt.sql
Rem
Rem DESCRIPTION
Rem This script defaults the dbid and instance number to that of the
Rem current instance connected-to, then calls awrrpti.sql to produce
Rem the Workload Repository report.
Rem
Rem NOTES
Rem Run as select_catalog privileges.
Rem This report is based on the Statspack report.
Rem
Rem If you want to use this script in an non-interactive fashion,
Rem see the 'customer-customizable report settings' section in
Rem awrrpti.sql
Rem
Rem MODIFIED (MM/DD/YY)
Rem pbelknap 10/24/03 - swrfrpt to awrrpt
Rem pbelknap 10/14/03 - moving params to rpti
Rem pbelknap 10/02/03 - adding non-interactive mode cmnts
Rem mlfeng 09/10/03 - heading on
Rem aime 04/25/03 - aime_going_to_main
Rem mlfeng 01/27/03 - mlfeng_swrf_reporting
Rem mlfeng 01/13/03 - Update comments
Rem mlfeng 07/08/02 - swrf flushing
Rem mlfeng 06/12/02 - Created
Rem --
-- Get the current database/instance information - this will be used
-- later in the report along with bid, eid to lookup snapshots set echo off heading on underline on;
column inst_num heading "Inst Num" new_value inst_num format 99999;
column inst_name heading "Instance" new_value inst_name format a12;
column db_name heading "DB Name" new_value db_name format a12;
column dbid heading "DB Id" new_value dbid format 9999999999 just c; prompt
prompt Current Instance
prompt ~~~~~~~~~~~~~~~~ select d.dbid dbid
, d.name db_name
, i.instance_number inst_num
, i.instance_name inst_name
from v$database d,
v$instance i; @@awrrpti undefine num_days;
undefine report_type;
undefine report_name;
undefine begin_snap;
undefine end_snap;
--
-- End of file
那么我们就通过调用该脚本产生报表信息:
后面就是基本简单操作。
关键产生报表后如何分析呢?
1、观察CACHE SIZE,观察主机内存情况,判断SGA的内存分批额是否合理
2、观察load profile的事务情况,判断系统繁忙程度
3、观察load profile的hard parses和Parses值,观察是否存在过多硬解析,从而定位是否存在绑定变量的问题
4、观察top 5 timed events,查看系统的瓶颈所在,一般而言,CPU TIME排名第一并且占用了绝大部分的时间比例,说明系统没有什么瓶颈
5、关注如下6个ordered by的sql语句,
elapsed_time,cpu time,gets,reads,executions,parse calls
oracle AWR深入研究分析,如何使用的更多相关文章
- Oracle AWR报告详细分析--比较详细
https://blog.csdn.net/demonson/article/details/79474133
- ORACLE AWR报告生成步骤
ORACLE AWR报告生成步骤 (以PL/SQL中命令窗口为例) 1.sqlplus或plsql的commod窗口(命令窗口)运行命令 @D:\oracle\product\10.2.0\db_1\ ...
- [转]oracle awr报告生成和分析
转自:http://blog.csdn.net/cuker919/article/details/8767328 最近由于数据库cpu占用非常高,导致VCS常常自动切换,引起很多问题. 最近学习一下数 ...
- (原创)如何在性能测试中自动生成并获取Oracle AWR报告
版权声明:本文为原创文章,转载请先联系并标明出处 由于日常使用最多的数据库为Oracle,因此,最近又打起了Oracle的AWR报告的主意. 过去我们执行测试,都是执行开始和结束分别手动建立一个快照, ...
- 【转】ORACLE AWR报告
转自:http://blog.csdn.net/liqfyiyi/article/details/8236864 About Oracle AWR Oracle AWR is a powerful m ...
- SQL中的Null深入研究分析
SQL中的Null深入研究分析 虽然熟练掌握SQL的人对于Null不会有什么疑问,但总结得很全的文章还是很难找,看到一篇英文版的, 感觉还不错. Tony Hoare 在1965年发明了 null 引 ...
- Oracle AWR,SQL_TRACE,10046,DBMS_PROFILER 等使用
Oracle AWR,SQL_TRACE,10046,DBMS_PROFILER 等使用 1 AWR 工具的使用及优化 1 10g默认安装 select * from dba_hist_wr_cont ...
- 快速熟悉 Oracle AWR 报告解读
目录 AWR报告简介 AWR报告结构 基本信息 Report Summary Main Report RAC statistics Wait Event Statistics 参考资料 本文面向没有太 ...
- Oracle AWR 数据导入/导出的步骤
LINUX状态下,连接oracle用户:su - oracle 1.上传采集快照.dmp文件至服务器 (dbid:4292035712) 919219826 2.在服务器端创建目录 (即文件夹a ...
随机推荐
- 关于abbr 的一些用法
<span style="margin: 20px;">位 000置:</span><abbr title='四川省绵阳市梓潼县文昌镇金龙乡一大队二组 ...
- [转] 小tips: 使用 等空格实现最小成本中文对齐 ---张鑫旭
by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=4562 一.重见天日第 ...
- webapp框架—学习AngularUI2(demo改造)
目的:把AngularUI的模板应用到“桂电在线”上 步骤如下: 按功能表修改demo界面 学习angularUI如何加载全部页面,为了设置自定义加载模板,在demo/demo.js中找到这一段 // ...
- JavaScript OOP 创建对象的7种方式
我写JS代码,可以说一直都是面向过程的写法,除了一些用来封装数据的对象或者jQuery插件,可以说对原生对象了解的是少之又少.所以我拿着<JavaScript高级程序设计 第3版>恶补了一 ...
- 搬瓦工vps搭建vpn
一.下载centos6一键安装包 wget --no-check-certificate https://raw.githubusercontent.com/teddysun/across/maste ...
- CocoaPods ADD private Spec Repo
Private Pods CocoaPods is a great tool not only for adding open source code to your project, but als ...
- Contest 高数题 樹的點分治 樹形DP
高数题 HJA最近在刷高数题,他遇到了这样一道高数题.这道高数题里面有一棵N个点的树,树上每个点有点权,每条边有颜色.一条路径的权值是这条路径上所有点的点权和,一条合法的路径需要满足该路径上任意相邻的 ...
- 百度统计js被劫持用来DDOS Github
今天中午刷着全国最大的信息安全从业人员同性交友社区zone.wooyun.org的时候,忽然浏览器每隔2秒就不断的弹窗: malicious javascript detected on this d ...
- 【Java】Java Platform
The Java platform has two components: The Java Virtual Machine The Java Application Programming Inte ...
- c++调用ffmpeg
在自己编译好ffmpeg库后,已经迫不及待的想尝试用vs2010来调用ffmpeg,在开始调用的时候遇到了些问题,但还是解决了. 配置vs 1.右键工程-属性,在然后选择 配置属性 -> C/C ...