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. Prometheus 监控告警系统搭建(对接飞书告警)

    Prometheus 是一套开源的系统监控报警框架,非常适合大规模集群的监控.它也是第二个加入CNCF的项目,受欢迎度仅次于 Kubernetes 的项目.本文讲解完整prometheus 监控和告警 ...

  2. ThreadLocal真的会造成内存泄漏吗?

    ThreadLoca在并发场景中,应用非常多.那ThreadLocal是不是真的会造成内存泄漏?今天给大家做一个分享,个人见解,仅供参考. 1.ThreadLocal的基本原理 简单介绍一下Threa ...

  3. Asp .Net Core系列:对VS 2019中ASP.NET Core项目解决:The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name

    错误: Add-Migration : The term 'Add-Migration' is not recognized as the name of a cmdlet, function, sc ...

  4. Cesium案例解析(十)——CZML点

    目录 1. 概述 2. 案例 3. 结果 1. 概述 CZML是Cesium中用于描述动态图形场景的JSON格式,它们的关系类似于Google Earth与KML之间的关系,一般会认为KML是一种矢量 ...

  5. Python实用技巧:将 Excel转为PDF

    将Excel文件转换为PDF可以方便储存表格数据,此外在打印或共享文档时也能确保表格样式布局等在不同设备和操作系统上保持一致.今天给大家分享一个使用第三方Python库Spire.XLS for Py ...

  6. 【华为云技术分享】DLI跨源|当DLI遇见MongoDB

    导语: MongoDB作为灵活高效易扩展的no-schema数据库,越来越受到互联网公司.游戏行业等开发者的青睐,但是MongoDB有着独特的语言接口,并不能很好满足数据分析师构建数据治理应用的需求, ...

  7. 实战案例丨GaussDB for DWS如何识别坏味道的SQL

    摘要:SQL中的坏味道,你知道吗? SQL语言是关系型数据库(RDB)的标准语言,其作用是将使用者的意图翻译成数据库能够理解的语言来执行.人类之间进行交流时,同样的意思用不同的措辞会产生不同的效果. ...

  8. 震惊!火爆全网的ChatGPT背后使用的数据库居然是……

    摘要:ChatGPT承认了自己背后使用的数据库是Cassandra. OpenAI最近发布的AI驱动的智能聊天机器人ChatGPT在互联网上掀起了一阵风暴,热衷于尝试这一新AI成果的网民不在少数.Ch ...

  9. LiteOS:盘点那些重要的数据结构

    摘要:本文会给读者介绍下LiteOS源码中常用的几个数据结构,包括: 双向循环链表LOS_DL_LIST,优先级队列Priority Queue,排序链表SortLinkList等. 在学习Huawe ...

  10. 单向数据流-从共享状态管理:flux/redux/vuex漫谈异步数据处理

    不管是Vue,还是 React,都需要管理状态(state),比如组件之间都有共享状态的需要. 什么是共享状态? 比如一个组件需要使用另一个组件的状态,或者一个组件需要改变另一个组件的状态,都是共享状 ...