11.2官档等待事件(二)

一 描述

参考官方文档中等待事件第二部分 Descriptions of Common Wait Event Parameters , 大致列出常用等待事件的参数说明.此档并未对参数进行详细说明.给出等待事件大致内容.

二 过程

按照Oracle® Database Reference 11g Release 2 (11.2) Part Number E17110-05 C Oracle Wait Events 官档的大纲内容进行整理。纲要内容如下:

    Classes of Wait Events

    Descriptions of Common Wait Event Parameters

    Descriptions of Wait Events

关于等待事件的信息可以在三个动态性能视图中显示出来:

v$session_wait   sessions正在进行或者已经完成的events

v$system_event  所有每个sessions已经完成的某个等待事件的总共等待次数 (翻不明白了,原文这样的:displays the total number of times all the sessions have waited for the events in that view.

v$session_event  v$system_event相似,但是只显示当前session的所有每一个等待事件的总共等待次数。

下面的sql语句列出所有wait events 及其wait class .

SQL> SELECT name, wait_class FROM V$EVENT_NAME ORDER BY name;

此篇文档介绍Descriptions of Common Wait Event Parameters

三 详细内容

此部分描述了一些经常使用的wait event parameters.

1.block#

数据等待的block number。此block#与其相应的数据文件相关,用下面的sql语句找到此块与之对应的object:(注意需要提供file#block#两个数值)

select segment_name, segment_type, owner, tablespace_name

from dba_extents

where file_id = file#

     and block#

     between block_id and block_id + blocks - 1;

2.blocks

正在向文件中读或写的block数。Block大小与文件类型相关。

数据文件block大小与 db_block_size 相关

日志文件与控制文件的block大小与操作系统平台的块大小相关。

3.break?

0表示服务端向客户端发送一个重置(reset)信息,非0表示服务器端向客户端发送一个断开(break)消息。

[If the value for this parameter equals 0, a reset was sent to the client. A nonzero value indicates that a break was sent to the client.]

4.class

blockclass。例如 class1 表明此blockdata blockclass4 表明此blocksegment header。「The class of the block describes how the contents of the block are used. For example, class 1 represents data block, and class 4 represents segment header.

5.dba

data block address,包含文件号与块号。

The initials "dba" represents the data block ddress, which consists of a file number and a block number.

6.driver id

服务器端和客户端连接使用的协议信息。

driverdisconnect function当前使用的地址. (:参考文档中写的跟官档的说明以现在的水平看不明白.)

[The address of the disconnect function of the driver that is currently being used.]

7.file#

数据库文件编号,以下语句返回数据库文件的名字及其他信息。(需提供file#)

select *

from v$datafile

where file# = file#;

8.id1

enqueueglobal lock的第一个identifier(id1),具体的值从P2P2RAW中获得,具体identifier的意思参考P1. (P1在哪里?)

[The first identifier (id1) of the enqueue or global lock takes its value from P2 or P2RAW. The meaning of the identifier depends on the name (P1).]

9.id2

enqueueglobal lock的第二个identifier(id1),具体的值从P3P3RAW中获得,具体identifier的意思参考P1. (P1在哪里?)

[The second identifier (id2) of the enqueue or global lock takes its value from P3 or P3RAW. The meaning of the identifier depends on the name (P1).]

10.le

(:不明白)

The relative index number into V$GC_ELEMENT.

11.mode

(:不明白,mode常存储P1P1RAWlow order?)

The mode is usually stored in the low order bytes of P1 or P1RAW and indicates the mode of the enqueue or global lock request. This parameter has one of the following values:

Table C-1 Lock Mode Values

Mode Value

Description

1

Null mode

2

Sub-Share

3

Sub-Exclusive

4

Share

5

Share/Sub-Exclusive

6

Exclusive

 

Use the following SQL statement to retrieve the name of the lock and the mode of the lock request:

select chr(bitand(p1,-16777216)/16777215)||

       chr(bitand(p1, 16711680)/65535) "Lock",

       bitand(p1, 65535) "Mode"

from v$session_wait

where event = 'DFS enqueue lock acquisition';

12.name and type

(:不明白,name or type 可以显示two high order bytes of P1 or P1RAW?)

The name or "type" of the enqueue or global lock can be determined by looking at the two high order bytes of P1 or P1RAW. The name is always two characters. Use the following SQL statement to retrieve the lock name.

select chr(bitand(p1,-16777216)/16777215)||

      chr(bitand(p1,16711680)/65535) "Lock"

from v$session_wait

where event = 'DFS enqueue lock acquisition';

13.namespace

object namespace中的name.v$db_object_cache视图中显示的相同.

[The name of the object namespace as it is displayed in V$DB_OBJECT_CACHE view.]

14.requests

I/O请求的次数.不同于请求的blocks,发起一次request可能包含多块.

[The number of I/Os that are "requested." This differs from the number of blocks in that one request could potentially contain multiple blocks.]

15.session#

inactivesession号。用下面的语句查找更多的信息。

The number of the inactive session. Use the following SQL statement to find more information about the session:

select *

from v$session

where sid = session#;

16.waited

直到session终断所记录的等待总时间。

This is the total amount of time the session has waited for this session to terminate.

 

四 个人总结

等待事件为判断等待情况的重要部分.

问题:等待事件参数id1,id2中的P1在哪里看? request参数的理解是否正确?

五 资料参考引用

Oracle® Database Reference 11g Release 2 (11.2) Part Number E17110-05

http://blog.sina.com.cn/s/blog_4dc6402101011eqp.html

namespace 参考 http://blog.csdn.net/tianlesoftware/article/details/6624122

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11780477/viewspace-753244/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11780477/viewspace-753244/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值