The ASH report shows tables and data files with wait event 'utl_file I/O':

CHANGES

No changes.

CAUSE

ASH reports retrieve data from the dba_hist_active_sess_history view. The information in that view is aggregated from what happened in between each sample from v$active_session_history, which means that it can potentially include multiple events (such as CPU and I/O events).

In the following example , code is executed that performs CPU and I/O operations in a short period of time:

alter system flush buffer_cache;
alter system flush shared_pool;

connect system/manager
set time on
set timing on
set serveroutput on
declare
x number;
begin
dbms_output.enable(1000000);
for i in (select s.*,rownum r from dba_source s) loop
 x:=dbms_utility.get_hash_value(i.name,1,163830000);
 if mod(x,99)=0 then 
  dbms_output.put('+');
 else
  dbms_output.put('.');
 end if;
 if mod(i.r,30000)=0 then
  dbms_output.put_line('*');
 end if;
end loop;
end;
/

If we query v$active_session_history, we see:

column event format a30 
column p1p2p3 format a20
select sample_id,NVL(event, 'CPU') AS event,p1||'-'||p2||'-'||p3 p1p2p3, TM_DELTA_CPU_TIME,TM_DELTA_DB_TIME,DELTA_READ_IO_REQUESTS
from v$active_session_history
where (session_id,SESSION_SERIAL#)=(select sid,serial# from v$session where sid=(select sid from v$mystat where rownum=1))
order by sample_id
/

SAMPLE_ID EVENT                          P1P2P3               TM_DELTA_CPU_TIME TM_DELTA_DB_TIME DELTA_READ_IO_REQUESTS
---------- ------------------------------ -------------------- ----------------- ---------------- ----------------------
    125687 CPU                            1-9720-8                        141978           126117                    311
    125688 CPU                            1-31856-16                     1093833          1105182                    142
    125689 CPU                            1-75808-16                                                                 100
    125690 CPU                            1-77248-16                     2009695          2020332                     66
    125691 CPU                            1-79952-16                                                                  64

Notice that all of the EVENTs listed are CPU events but the PL/SQL must have had to perform I/O. This I/O is reflected in DELTA_READ_IO_REQUESTS. By looking at the columns p1,p2,p3, it can be found some residual values from what probably was a 'db file scattered read' where p1 is file_no, p2 block_id , and p3 is blocks.
This is confirmed by looking up those blocks in the data dictionary.

SQL> select segment_name from dba_extents where file_id =1 and 9720 between block_id and block_id+blocks;

SEGMENT_NAME
---------------------------------------------------------------------------------
SOURCE$

SQL> select segment_name from dba_extents where file_id =1 and 79952  between block_id and block_id+blocks;

SEGMENT_NAME
---------------------------------------------------------------------------------
SOURCE$

SOLUTION

This is expected behavior.

The wait event surfaces when a PL/SQL program is running SQLs and using UTL_FILE in close proximity. Multiple IOs to the DB and UTL_FILE calls were executed in fast succession and the p1p2p3 sampled were residual from DB IO events to the datafiles. The "utl_file I/O" event was included as part of the sample. So when the ASH report is generated, both the "utl_file I/O" event  and the information of datafiles accessed are present.

转 event 'utl_file I/O':的更多相关文章

  1. 利用utl_file来读取文件.

    以前写过用external table来加载trace文件,详情参考下面链接. http://www.cnblogs.com/princessd8251/p/3779145.html 今天要做到是用U ...

  2. 如何利用ETW(Event Tracing for Windows)记录日志

    ETW是Event Tracing for Windows的简称,它是Windows提供的原生的事件跟踪日志系统.由于采用内核(Kernel)层面的缓冲和日志记录机制,所以ETW提供了一种非常高效的事 ...

  3. [.NET] C# 知识回顾 - Event 事件

    C# 知识回顾 - Event 事件 [博主]反骨仔 [原文]http://www.cnblogs.com/liqingwen/p/6060297.html 序 昨天,通过<C# 知识回顾 - ...

  4. Atitit 解决Unhandled event loop exception错误的办法

    Atitit 解决Unhandled event loop exception错误的办法 查看workspace/.metadata/.log org.eclipse.swt.SWTError: No ...

  5. Java模拟Windows的Event

    场景 开发中遇到一个场景,业务操作会不定时的产生工作任务,这些工作任务需要放入到一个队列中,而另外会有一个线程一直检测这个队列,队列中有任务就从队列中取出并进行运算. 问题 业务场景倒是简单,只不过这 ...

  6. 事件EVENT与waitforsingleobject的使用

    事件event与waitforsingleobject的配合使用,能够解决很多同步问题,也可以在数据达到某个状态时启动另一个线程的执行,如报警. event的几个函数: 1.CreateEvent和O ...

  7. 火狐浏览器中event不起作用解决办法--记录(一)

    今天遇到了这个问题.IE,谷歌下都没问题,但在FF下却不起作用,很郁闷查了半天,看别人博文写了老长,结果试了要么起作用,但太麻烦,要么不起作用,说了那么多跟没说一样. 其实只要这一句代码就行:e=ar ...

  8. Event事件

    妙味课堂-Event事件 1.焦点:当一个元素有焦点的时候,那么他就可以接受用户的输入(不是所有元素都能接受焦点) 给元素设置焦点的方式: 1.点击 2.tab 3.js 2.(例子:输入框提示文字) ...

  9. Event Sourcing Pattern 事件源模式

    Use an append-only store to record the full series of events that describe actions taken on data in ...

随机推荐

  1. Linus Torvalds: 成功的项目源于99%的汗水与1%的创新

    2017年2月15日,在加利福尼亚州的开源领袖峰会上,由Linux基金会执行董事Jim Zemlin进行的一次采访中,Torvalds讨论了他如何管理Linux内核的开发以及他对工作的态度. Linu ...

  2. stack_2.由两个栈组成队列

    思路: 用两个栈($stack_a, $stack_b),当push的时候,压入$stack_a, 让pop的时候,先把$stack_a元素依次全部倒入$stack_b中,再对$stack_b进行po ...

  3. 1107 Social Clusters (30)(30 分)

    When register on a social network, you are always asked to specify your hobbies in order to find som ...

  4. 前端PHP Session的实例

    登陆例子:(请注意一定要自己敲一遍,不要CV大法) 首先上一下成果图,激起同学们写的欲望,登录页如下:  点击登陆之后如下: 说明哦了,么问题.接下来自己实现一下. 首先数据库信息: 新建一个名为 l ...

  5. POCO库中文编程参考指南(11)如何使用Reactor框架?

    1 Reactor 框架概述 POCO 中的 Reactor 框架是基于 Reactor 设计模式进行设计的.其中由 Handler 将某 Socket 产生的事件,发送到指定的对象的方法上,作为回调 ...

  6. Day05:装饰器,三元表达式,函数的递归,匿名/内置函数,迭代器,模块,开发目录

    上节课复习:1.函数的对象    函数可以被当作数据取处理2.函数嵌套    嵌套调用:在调用一个函数时,函数体代码又调用了其他函数    嵌套定义:在一个函数内部又定义了另一个函数 def foo( ...

  7. window下redis如何查看版本号

    1.启动服务端:redis-server 2.启动客户端:redis-cli 3.客户端输入:info 即可.

  8. ICU 是一种说不出的痛啊

    USE [Nursing] GO /****** Object: StoredProcedure [dbo].[P_GetICUVitualSign] Script Date: 05/21/2015 ...

  9. npm下载模块提速方法

    通过config配置指向国内镜像源,命令如下 npm config set registry https://registry.npm.taobao.org 然后可以查看是否配置成功 npm conf ...

  10. 2-5 Flutter开发环境与Android开发环境设置详解(Windows)

    第二个是国内服务器的网址 andoid stuido的一些使用的说明文档 https://developer.android.google.cn/studio/intro 安装Flutter Dart ...