IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

AWR报告

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

(一) AWR报告介绍

AWR全称Automatic Workload Repository,自动工作负载库。在Oracle 10g之前,用户连接到数据库,产生session,session信息保存在v$session中,处于等待的session被复制一份到v$session_wait中,当会话中止时,本次会话产生的v$session和v$session_wait信息会丢失。10g以后,Oracle保留了v$session_wait的信息,并新增了v$active_session_history(ASH)视图,记录每个活动session在v$session_wait中最近10次的信息。

ASH采样数据保存在内存中,但是分配给ASH的内存是有限的,当内存占满,旧的数据将被覆盖。并且,一旦重启数据库或服务器,内存中的信息将会丢失。所以,想要长期保存ASH的数据信息是不可能的。

在Oracle 10g中,产生了永久保存ASH的方法,就是AWR。AWR的工作策略是:每小时对v$active_session_history进行采样,并将信息保存到磁盘中,保留7天,7天后旧的记录会被覆盖。这些采样信息被保存在视图wrh$_active_session_history中。采集频率(1hours)和保存期限(7 day)是可以调整的。在Oracle Database 11g中,快照数据的默认保留期已经从七天更改为八天,以确保捕获整周的性能数据。

(二) 创建AWR报告

(1) 查看Oracle数据库是否启用AWR报告功能

show parameter statistics_level

结果如下说明开启了AWR报告

SQL> show parameter statistics_level;

NAME TYPE VALUE

-———————————– ———– ——————————

statistics_level string TYPICAL

(2) 快照(Snapshot)

每隔1小时,内存监控进程(MMON)自动采集一次统计信息,并把这些信息放到负载库中,一次采样就是一个快照,为了节省时间,采集的数据在7天(Oracle 11g为8天)后清除。

(1) 创建过程

先指定报告存放位置,目前发现linux的oracle用户切换到哪个目录,awr报告就保存在哪里。

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @?/rdbms/admin/awrrpt.sql                      /*执行脚本*/

Current Instance
~~~~~~~~~~~~~~~~

   DB Id    DB Name  Inst Num Instance
----------- ------------ -------- ------------
 1464270464 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'
Enter value for report_type: html                      /*选择报告类型(html和text)*/

Type Specified:  html


Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   DB Id     Inst Num DB Name      Instance Host
------------ -------- ------------ ------------ ------------
* 1464270464        1 ORCL     orcl     localhost.lo
                        caldomain

Using 1464270464 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: 2             /*生成报告的天数*/

Listing the last 2 days of Completed Snapshots

                            Snap
Instance     DB Name        Snap Id    Snap Started    Level
------------ ------------ --------- ------------------ -----
orcl         ORCL        28 06 Mar 2017 15:02      1
                 29 06 Mar 2017 16:00      1
                 30 06 Mar 2017 17:00      1

                 31 07 Mar 2017 10:47      1
                 32 07 Mar 2017 12:00      1
                 33 07 Mar 2017 13:10      1
                 34 07 Mar 2017 14:00      1
                 35 07 Mar 2017 15:00      1
                 36 07 Mar 2017 16:00      1
                 37 07 Mar 2017 17:00      1



Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 31            /*开始快照*/
Begin Snapshot Id specified: 31

Enter value for end_snap: 37             /*结束快照*/
End   Snapshot Id specified: 37



Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_31_37.html.  To use this name,
press <return> to continue, otherwise enter an alternative.

Enter value for report_name:               /*awr报告名称*/

*疑问:awr报告是在服务器上生成的,linux/unix没有图形显示方式,如何查看。

部分资料来源于:http://tech.souyunku.com/lanzi/archive/2011/03/07/1975096.html

文章永久链接:https://tech.souyunku.com/?p=35037


Warning: A non-numeric value encountered in /data/wangzhan/tech.souyunku.com.wp/wp-content/themes/dux/functions-theme.php on line 1154
赞(80) 打赏



未经允许不得转载:搜云库技术团队 » AWR报告

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码
IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

评论 抢沙发

大前端WP主题 更专业 更方便

联系我们联系我们

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

微信扫一扫打赏


Fatal error: Uncaught Exception: Cache directory not writable. Comet Cache needs this directory please: `/data/wangzhan/tech.souyunku.com.wp/wp-content/cache/comet-cache/cache/https/tech-souyunku-com/index.q`. Set permissions to `755` or higher; `777` might be needed in some cases. in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php:367 Stack trace: #0 [internal function]: WebSharks\CometCache\Classes\AdvancedCache->outputBufferCallbackHandler() #1 /data/wangzhan/tech.souyunku.com.wp/wp-includes/functions.php(5109): ob_end_flush() #2 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(303): wp_ob_end_flush_all() #3 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /data/wangzhan/tech.souyunku.com.wp/wp-includes/plugin.php(470): WP_Hook->do_action() #5 /data/wangzhan/tech.souyunku.com.wp/wp-includes/load.php(1097): do_action() #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php on line 367