SESSION 34 执行存储过程:

SESSION 43 编译存储过程:

SESSION 25  删除存储过程:

1.查询查看library cache lock等待事件的相关会话  

SQL> select sid, P1RAW,P1TEXT ,event from v$session_wait where event not like '%message%';

       SID P1RAW	    P1TEXT							     EVENT
---------- ---------------- ---------------------------------------------------------------- ----------------------------------------------------------------
2 000000000000006F duration pmon timer
3 00 VKTM Logical Idle Wait
5 0000000000000005 component DIAG idle wait
8 0000000000000005 component DIAG idle wait
10 00000000000006F0 requests db file async I/O submit
13 000000000000012C sleep time smon timer
18 00 Streams AQ: qmn coordinator idle wait
25 000000002BF0897C handle address library cache lock
26 0000000000000001 Type Streams AQ: qmn slave idle wait
28 0000000000000001 Slave ID Space Manager: slave idle wait
31 0000000000000004 file# db file sequential read SID P1RAW P1TEXT EVENT
---------- ---------------- ---------------------------------------------------------------- ----------------------------------------------------------------
32 00 Streams AQ: waiting for time management or cleanup tasks
34 0000000000000004 file# db file sequential read
43 000000002BF0897C handle address library cache pin SQL> select saddr,sid,username,event,p1raw from v$session where event='library cache lock'; SADDR SID USERNAME EVENT P1RAW
-------- ---------- ------------------------------ ---------------------------------------------------------------- ----------------
35FEE7F0 25 TEST library cache lock 000000002BF0897C 2.查询持有library cache lock的会话以及lock住的对象 SQL> select user_name,kglnaobj "Owner",kgllkses saddr,kgllkreq req,kgllkmod mod,kglnaobj object
from x$kgllk lock_a
where kgllkmod > 0
and exists (select lock_b.kgllkhdl from x$kgllk lock_b
where kgllkses = '35FEE7F0' /* blocked session */
and lock_a.kgllkhdl = lock_b.kgllkhdl
and kgllkreq > 0); 2 3 4 5 6 7 USER_NAME Owner SADDR REQ MOD OBJECT
------------------------------ ------------------------------------------------------------ -------- ---------- ---------- --------------------------------- ---------------------------
TEST TEST_PRC 35FD6A24 0 1 TEST_PRC
TEST TEST_PRC 35FBEC58 0 3 TEST_PRC 这里出现了两行结果,不过从mod列可以判断35FD6A24这个会话持有的lock模式为1(如果没记错的话数字1表示null),所以正在阻塞25会话的是会话地址为35FBEC58的会话。
你也可以通过以下sql做进一步验证 SQL> select sid,saddr,event,q.sql_text from v$session s,v$sql q
where saddr in ('35FD6A24','35FBEC58') and s.sql_id=q.sql_id; 2 SID SADDR EVENT SQL_TEXT
---------- -------- -------------------- --------------------
34 35FD6A24 db file sequential r INSERT INTO TEST1 SE
ead LECT * FROM TEST1 43 35FBEC58 library cache pin alter procedure tes
t_prc compile 从输出结果发现会话地址为35FBEC58 的会话正在编译TEST_PRC,所以该会话持有的lock模式肯定会x,而会话25正是被它所阻塞。

library cache lock的更多相关文章

  1. Library Cache: Lock, Pin and Load Lock

    What is "Library cache lock" ? This event controls the concurrency between clients of the ...

  2. library cache lock和cursor: pin S wait on X等待

    1.现象: 客户10.2.0.4 RAC环境,出现大量的library cache lock和cursor: pin S wait on X等待,经分析是由于统计信息收集僵死导致的.数据库在8点到9点 ...

  3. Library cache lock/pin详解

    Library cache lock/pin 一.概述 ---本文是网络资料加metalink 等整理得来一个实例中的library cache包括了不同类型对象的描述,如:游标,索引,表,视图,过程 ...

  4. Library cache lock 故障解决一例

    今天收到同事电话,说是数据库中一张名为acct_balance进行操作是奇慢,第一反映是不是扫行计划有问题,结果我错了,现将过程记录下来. 用pl/sql连上数据库情况:1.对acct_balance ...

  5. Performance tuning library cache lock & single-task message

    My colleague suddenly encountered a problem today,a Database becomes very slow , and the a lot of se ...

  6. 深入理解shared pool共享池之library cache的library cache lock系列四

    本文了解下等待事件library cache lock,进一步理解library cache,之前的文章请见:  深入理解shared pool共享池之library cache的library ca ...

  7. 如何使用event 10049分析定位library cache lock and library cache pin

    Oracle Library Cache 的 lock 与 pin 说明 一. 相关的基本概念 之前整理了一篇blog,讲了Library Cache 的机制,参考: Oracle Library c ...

  8. 外键约束列并没有导致大量建筑指数library cache pin/library cache lock

    外键约束列并没有导致大量建筑指数library cache pin/library cache lock 清除一个100大数据表超过一百万线,发现已经运行了几个小时: delete B001.T_B1 ...

  9. 关于library cache lock和row cache lock产生的常见原因

    这两个等待事件其实很少出现在top5列表中,一般都没什么印象,在此整理记录以便以后查阅. 常见的library cache lock产生的原因在<高级OWI与Oracle性能调查>这本书和 ...

随机推荐

  1. JAVA大数类

    JAVA大数类api http://man.ddvip.com/program/java_api_zh/java/math/BigInteger.html#method_summary 不仅仅只能查J ...

  2. July收集荷兰国旗问题之三路partition

    这道题目和分成两块的partition的扩展.比如有一堆0 1 2 数字组成的数组,要分成 00 00  11 1 1  222 2这样的顺序的. 利用lumoto版的partition能够非常好的解 ...

  3. 在Quick-cocos2dx中使用云风pbc解析Protocol Buffers,支持win、mac、ios、android

    本例主要介绍 如何将 pbc 集成到quick-cocos2dx框架中,让我们的cocos2dx客户端Lua拥有编解码Protocol Buffers能力. 参考: 云风pbc的用法: http:// ...

  4. [TypeScript] Inheritance

    Inheritance is a way toindicate that a class receives behavior from a parent class. Then we can over ...

  5. Android之开发常用颜色

    Android开发中常常要用一些个性化的颜色,然而茫茫的RBG颜色对照表,往往给人眼花缭乱的感觉,更别说从中轻易选出一两种比较满意的颜色,下面我就总结一下开发中常用到的比较绚丽的颜色,都是有名有姓的哦 ...

  6. 用PHP迭代器来实现一个斐波纳契数列(转)

    斐波纳契数列通常做法是用递归实现,当然还有其它的方法.这里现学现卖,用PHP的迭代器来实现一个斐波纳契数列,几乎没有什么难度,只是把类里的next()方法重写了一次.注释已经写到代码中,也是相当好理解 ...

  7. 模板-->Matrix重载运算符:+,-,x

    如果有相应的OJ题目,欢迎同学们提供相应的链接 相关链接 所有模板的快速链接 poj_2118_Firepersons,my_ac_code 简单的测试 INPUT: 1 2 3 1 3 4 3 -1 ...

  8. 排名最重要的三个优化阶段分析 --------------------->>转至(卧牛SEO/武汉SEO http://blog.sina.com.cn/zhengkangseo )

    网站排名,不是一两天能够决定的.要想取得好的排名,得分时间分阶段地做排名,网站优化分前期,中期,后期,怎么来区别不同的阶段该用怎样的优化手段.今晚SEO研究中心创始人Moon老师分享:排名最重要的三个 ...

  9. 让VC编译出来的程序不依赖于msvcr80.dll/msvcr90.dll/msvcr100.dll等文件

    ---转载:http://hi.baidu.com/liu_haitao/item/e2157ac3a3c32a0bc610b253 让VC编译出来的程序不依赖于msvcr80.dll/msvcr90 ...

  10. 用Global.asax实现伪静态.

    在Global.asax文件里添加Application_BeginRequest事件处理.添加如下代码: 1 protected void Application_BeginRequest(Obje ...