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. SqlServer性能急剧下降,查看所有会话的状态及等待类型---Latch_Ex

    当某个数据库文件空间用尽,做自动增长的时候,同一时间点只能有一个用户人员可以做文件自动增长动作,其他任务必须等待,此时会出现Latch资源的等待.使用sp_helpdb查看业务数据库时发现:该数据库设 ...

  2. R(一): R基础知识

    R 是一门拥有统计分析及作图功能的免费软件,主要用于数学建模.统计计算.数据处理.可视化等方向.据 IEEE Spectrum发布的2016年编程语言前10位排名来看,R语言由2015年排名第6位上升 ...

  3. [oracle] ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener

    安装好Oracle数据库后: 执行 dbstart和dbshut会提示: [oracle@oracle11g ~]$ dbstartORACLE_HOME_LISTNER is not SET, un ...

  4. 【linux】windows和linux编码相互转换

    windows-->linux:dos2unix  file linux-->windows:unix2dos  file

  5. js 字符串转换为数值

    原帖地址:http://www.cnblogs.com/jenney-qiu/archive/2012/02/27/2369848.html 使用parseInt()你可以从字符串中获取数值,该方法接 ...

  6. [linux basic]--线程

    /************************************************************************* > File Name: thread1.c ...

  7. 单源最短路径——dijkstra算法

    dijkstra算法与prim算法的区别   1.先说说prim算法的思想: 众所周知,prim算法是一个最小生成树算法,它运用的是贪心原理(在这里不再证明),设置两个点集合,一个集合为要求的生成树的 ...

  8. Hadoop学习2--Linux准备及环境准备

    1.环境安装: 虚拟机:VMware Player 系统:Ubuntu12 注意事项:注意位数,包括系统,java,Hadoop 2.切换账号 当前登录账号是自己的账号,如果想切换到root,且是第一 ...

  9. 黄聪:C#中WebClient自动判断编码是UTF-8还是GBK,并且有超时判断功能

    public class WebDownload : WebClient { private int _timeout; /// <summary> /// 超时时间(毫秒) /// &l ...

  10. [MySQL] 常用SQL技巧--18.5

    1.正则表达式使用 MySQl利用REGEXP命令,提供正则表达式功能. 例子:select 'abcdef' REGEXP '^a'; select 'efg' REGEXP '[^XYZ]'; 2 ...