https://www.cnblogs.com/jyzhao/p/4030022.html

本文旨在用来指导项目人员自行提取Oracle数据库的AWR报告.

1.当前连接实例的AWR报告提取:@?/rdbms/admin/awrrpt

2.RAC的其他实例AWR报告提取:@?/rdbms/admin/awrrpti

3.手工生成一个快照

1.当前连接实例的AWR报告提取:@?/rdbms/admin/awrrpt

SQL> @?/rdbms/admin/awrrpt

//注意输入的@?/rdbms/admin/awrrpt 中间没有任何空格,需要在数据库服务器上Oracle用户登陆,sqlplus / as sysdba 进入SQL> 下执行.
Current Instance
~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
857123342 JY 1 jy1 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'
Enter value for report_type:
//注意这里直接回车即可,默认就是html格式的
Type Specified: html Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
857123342 2 JY jy2 rac2-server
* 857123342 1 JY jy1 rac1-server Using 857123342 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. Enter value for num_days: 1
//注意这里根据实际需要选择几天的AWR报告,一般取最近的AWR报告选择1天即可

Listing the last day's Completed Snapshots Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
jy1 JY 92 16 Oct 2014 07:32 1
93 16 Oct 2014 09:00 1
94 16 Oct 2014 10:00 1
95 16 Oct 2014 11:00 1 Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 94
Begin Snapshot Id specified: 94 Enter value for end_snap: 95
End Snapshot Id specified: 95 //注意这里输入的begin_snap 和 end_snap都是根据上面具体时间点对应的实际Snap Id那一列决定的. 比如我要选 09:00 - 10:00的话,那起始就应该是93和94.  Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_94_95.html. To use this name,
press <return> to continue, otherwise enter an alternative. Enter value for report_name:
//这里默认回车即可,名字会有一个默认值的。

Using the report name awrrpt_1_94_95.html

此处省略大量屏幕输出..

End of Report
</BODY></HTML>
Report written to awrrpt_1_94_95.html
SQL> !pwd
/home/oracle

注:生成的报告文件发送给我即可,例如此处就是指awrrpt_1_94_95.html文件,代表的是2014年10月16日10点~11点这一小时的数据库实例jy1的工作负载报告。

2.RAC的其他实例AWR报告提取:@?/rdbms/admin/awrrpti

SQL> @?/rdbms/admin/awrrpti

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'
Enter value for report_type: Type Specified: html Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
857123342 2 JY jy2 rac2-server
* 857123342 1 JY jy1 rac1-server Enter value for dbid: 857123342
Using 857123342 for database Id
Enter value for inst_num: 2
Using 2 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. Enter value for num_days: Listing all Completed Snapshots Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
jy2 JY 91 14 Oct 2014 10:10 1 92 16 Oct 2014 07:32 1
93 16 Oct 2014 09:00 1
94 16 Oct 2014 10:00 1
95 16 Oct 2014 11:00 1 Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 94
Begin Snapshot Id specified: 94 Enter value for end_snap: 95
End Snapshot Id specified: 95 Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_2_94_95.html. To use this name,
press <return> to continue, otherwise enter an alternative. Enter value for report_name: Using the report name awrrpt_2_94_95.html 此处省略大量屏幕输出.. End of Report
</BODY></HTML>
Report written to awrrpt_2_94_95.html

3.手工生成一个快照:

exec dbms_workload_repository.create_snapshot();
SQL> exec dbms_workload_repository.create_snapshot();

PL/SQL procedure successfully completed.
AlfredZhao版权所有「从Oracle起航,领略精彩的IT技术。」

[转帖]Oracle AWR报告提取方法的更多相关文章

  1. Oracle AWR报告提取方法

    本文旨在用来指导项目人员自行提取Oracle数据库的AWR报告. 1.当前连接实例的AWR报告提取:@?/rdbms/admin/awrrpt 2.RAC的其他实例AWR报告提取:@?/rdbms/a ...

  2. AWR报告提取方法

    AWR报告提取方法 关键字 AWR报告 内容描述 AWR报告的提取方法 涉及设备 oracle 10g 操作说明 [问题现象描述] 现场提取AWR报告 [分析结论及解决方案] Awr报告生成方法 进入 ...

  3. Oracle AWR报告指标全解析-11011552

    1-5 Top 5 Timed EventsWaits : 该等待事件发生的次数, 对于DB CPU此项不可用Times : 该等待事件消耗的总计时间,单位为秒, 对于DB CPU 而言是前台进程所消 ...

  4. Oracle AWR 报告详解

    转自:http://blog.csdn.net/laoshangxyc/article/details/8615187 持续更新中... Oracle awr报告详解 DB Name DB Id In ...

  5. (原创)如何在性能测试中自动生成并获取Oracle AWR报告

    版权声明:本文为原创文章,转载请先联系并标明出处 由于日常使用最多的数据库为Oracle,因此,最近又打起了Oracle的AWR报告的主意. 过去我们执行测试,都是执行开始和结束分别手动建立一个快照, ...

  6. ORACLE AWR报告生成步骤

    ORACLE AWR报告生成步骤 (以PL/SQL中命令窗口为例) 1.sqlplus或plsql的commod窗口(命令窗口)运行命令 @D:\oracle\product\10.2.0\db_1\ ...

  7. 快速熟悉 Oracle AWR 报告解读

    目录 AWR报告简介 AWR报告结构 基本信息 Report Summary Main Report RAC statistics Wait Event Statistics 参考资料 本文面向没有太 ...

  8. ORACLE AWR报告数据的导入导出实践

    关于AWR的快照数据可以导出.导入,一直没有亲手实践过.今天动手测试了一下如何导出.导入AWR数据,将AWR的数据从一测试服务器,导入到另外一台测试服务器. SQL> @?/rdbms/admi ...

  9. ORACLE AWR报告生成过程出现多个实例记录分析

    在一次生成AWR报告中,发现在"Instances in this Workload Repository schema"部分,出现了多个实例记录信息(host敏感信息被用host ...

  10. 转: Oracle AWR 报告 每天自动生成并发送邮箱

    原贴地址:http://www.cnblogs.com/vigarbuaa/archive/2012/09/05/2671794.html Oracle AWR 介绍http://blog.csdn. ...

随机推荐

  1. Spring Boot与Shiro和Mybatis整合

    1:shiro是什么? Apache Shiro 是ASF旗下的一款开源软件 shrio是一款强大而灵活的安全框架 可为任何应用提供安全保障- 从命令行应用.移动应用到大型网络及企业应用 2:shir ...

  2. 解决 cv2.destroyAllWindows() 无效问题

    方法一 示例代码: import cv2 import numpy as npimg = np.zeros((512,512),np.uint8)#生成一个空灰度图像 cv2.line(img,(0, ...

  3. win10 安装 AutoCAD

    有些人在 win10 系统下 安装 AutoCAD 会有些小问题,不要担心,根据下面这些图片就可以解决你的问题 答案很简单,就是安装.NET Framework3.5,这里提供一种安装方法供大家参考: ...

  4. flutter中InheritedWidget共享数据

    InheritedWidget是Flutter框架中用于在Widget树中共享数据的机制.它是一个特殊的Widget,可以将其放置在Widget树的上层,并向下传递共享的数据给其子Widget.子Wi ...

  5. SSH默认端口从22修改为其他端口

    1.在终端中使用root权限登录到您的Linux服务器. 2.打开终端,并使用适合您的文本编辑器(如vi.nano等)打开SSH配置文件.例如,通过运行以下命令之一: vi /etc/ssh/sshd ...

  6. LeetCode 二分查找篇(69、33、704)

    69. x 的平方根 实现 int sqrt(int x) 函数. 计算并返回 x 的平方根,其中 x 是非负整数. 由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去. 示例 1: 输入: ...

  7. 记一次 MySQL timestamp 精度问题的排查 → 过程有点曲折

    开心一刻 下午正准备出门,跟正刷着手机的老妈打个招呼 我:妈,今晚我跟朋友在外面吃,就不在家吃了 老妈拿着手机跟我说道:你看这叫朋友骗缅北去了,tm血都抽干了,多危险 我:那是他不行,你看要是吴京去了 ...

  8. Kubernetes的拐点助推器:左手开源,右手边缘计算

    摘要:KubeEdge 是首个基于 Kubernetes 扩展的,提供云边协同能力的开放式智能边缘计算平台,也是 CNCF 在智能边缘领域的首个正式项目.依托 Kubernetes 强大的容器编排和调 ...

  9. 跟我学ModelArts丨探索ModelArts平台个性化联邦学习API

    摘要:ModelArts提供了一个实现个性化联邦学习的API--pytorch_fedamp_emnist_classification,它主要是让拥有相似数据分布的客户进行更多合作的一个横向联邦学习 ...

  10. 零代码修改,教你Spring Cloud应用轻松接入CSE

    摘要:本文介绍了Sermant Agent的接入原理和如何使用Sermant Agent无修改接入CSE. 本文分享自华为云社区<Spring Cloud应用零代码修改接入华为云微服务引擎CSE ...