What is "Library cache lock" ?

This event controls the concurrency between clients of the library cache. It acquires a lock on the object handle so that either:

  • One client can prevent other clients from accessing the same object.
  • The client can maintain a dependency for a long time (for example, so that no other client can change the object).

This lock is also obtained to locate an object in the library cache.
Library cache lock will be obtained on database objects referenced during parsing or compiling of SQL or PL/SQL statements (table, view, procedure, function, package, package body, trigger, index, cluster, synonym). The lock will be released at the end of the parse or compilation.

Cursors (SQL and PL/SQL areas), pipes and any other transient objects do not use this lock.
Library cache lock is not deadlock sensitive and the operation is synchronous.

Parameters:
 

  • handle address
    Address of the object being loaded.
  • lock address
    Address of the load lock being used. This is not the same thing as a latch or an enqueue, it is a State Object.
  • Mode
    Indicates the data pieces of the object which need to be loaded.
  • Namespace
    The name of the object namespace as it is displayed in V$DB_OBJECT_CACHE view

What is "Library cache pin"?

This event manages library cache concurrency. Pinning an object causes the heaps to be loaded into memory. If a client wants to modify or examine the object, the client must acquire a pin after the lock. Pin can be acquired in NULL, SHARE or EXCLUSIVE modes and can be considered as a special form of lock. A wait for a "library cache pin" implies some other session holds that PIN in an incompatible mode.

Library cache pin will be obtained on a database object that is currently cached in the library cache (table, view, procedure, function, package, package body, trigger, index, cluster, synonym). In the library cache, a database object is cached in 2 parts: "handle" and "object". Library cache pin is only held when the "object" part is cached.

It is not deadlock sensitive and the operation is synchronous

Library Cache: Lock, Pin and Load Lock的更多相关文章

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

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

  2. Library cache lock/pin详解

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

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

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

  4. 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 ...

  5. 怎么发现RAC环境中&#39;library cache pin&#39;等待事件的堵塞者(Blocker)?

    怎么发现RAC环境中的'library cache pin'等待事件的堵塞者(Blocker) 參考自 How to Find the Blocker of the 'library cache pi ...

  6. 共享池之八:软解析、硬解析、软软解析 详解一条SQL在library cache中解析涉及的锁

    先来张大图: 结合上图来说明一下解析的各个步骤涉及的锁. 软解析.硬解析.软软解析区别的简单说明: 为了将用户写的sql文本转化为oracle认识的且可执行的语句,这个过程就叫做解析过程. 解析分为硬 ...

  7. 共享内存shared pool (5):详解一条SQL在library cache中解析

    前面介绍的 shared pool,library cache结构,都是为了说明一条SQL是如何被解析的.先看下面的图: 图中涉及的各结构简单介绍 父HANDLE,里面有父游标堆0的地址.. 父游标堆 ...

  8. 共享池之六:shared pool latch/ library cache latch /lock pin 简介

    latch:library cache --desc v$librarycache; latch:library cache用于保护hash bucket.library cache lock保护HA ...

  9. 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点 ...

随机推荐

  1. Oracle NoLogging Append 方式减少批量insert的redo_size

    业务处理中,很多时候使用实表临时表处理中间结果,而实表的Insert操作缺省会记录redo log,针对此问题收集相关测试总结信息如下: [转] 常见dml.ddl语句使用nologging选项所生成 ...

  2. Redis 利用锁机制来防止缓存过期产生的惊群现象-转载自 http://my.oschina.net/u/1156660/blog/360552

    首先,所谓的缓存过期引起的“惊群”现象是指,在大并发情况下,我们通常会用缓存来给数据库分压,但是会有这么一种情况发生,那就是在一定时间 内生成大量的缓存,然后当缓存到期之后又有大量的缓存失效,导致后端 ...

  3. Servlet Listener

    需要继承ServletContextListener接口. 代码: package com.my; import java.io.*; import javax.servlet.*; import j ...

  4. Nginx实现内参:为什么架构很重要?

    Nginx在web开发者眼中就是高并发高性能的代名词,其基于事件的架构也被众多开发者效仿.我从Nginx的网站找到一篇技术文章将Nginx是怎样实现的,文章是Nginx的产品老大Owen Garret ...

  5. HTML网页调用本地QQ

    打开聊天窗口代码: tencent://message/?uin=QQ号码&Site=有事Q我&Menu=yes 使用方法: <a href="tencent://me ...

  6. 实现web数据同步的四种方式

    http://www.admin10000.com/document/6067.html 实现web数据同步的四种方式 1.nfs实现web数据共享 2.rsync +inotify实现web数据同步 ...

  7. Ubuntu防火墙 UFW 设置

    Ubuntu防火墙 UFW 设置 1.安装 sudo apt-get install ufw 2.启用 sudo ufw enable sudo ufw default deny 运行以上两条命令后, ...

  8. IGS_学习笔记07_IREP通过页面测试客户化Web Service调用(案例)

    20150819 Created By BaoXinjian

  9. python(17) 获取acfun弹幕,评论和视频信息

    每天一点linux命令:新建文件夹

  10. A+B问题 涉及EOF

    输入将包括一系列对的整数a和b,通过一空间,一对每行整数分离的.  产量 对于每对输入的整数a和b你应该输出的a和b的总和在一行,并用输出的一个行中输入每一行.  样本输入 1 5  2 3  样本输 ...