Library Cache Pin Wait Event (within the context of APEX)

Hello,
Firstly -
Oracle Version: 10.2.0.4.0
Apex Version: 3.0.1.00.08
Okay, my colleague (no really! This isn't one of those "Ahem ... A friend of mine has contracted something nasty +downstairs+..."-type questions) is having problems compiling a package (using TOAD incidentally, but it's the same in SQL Developer).
I've searched the forum and the web for a bit of help on what's maybe happening here and it appears to be related to a concurrency conflict with the package definition - from what I can understand it's a case of the package is in use by another session, therefore another session cannot alter it at the same time (which makes sense)
"What does this have to do with APEX?"... well, he is working on this package using the following methodology:
1. Compile the package body/spec (as necessary - body more often obviously)
2. run an apex page which uses the code in a process, which may or may not result in the error page being displayed
3. Making changes to the package body/spec
repeat steps 1-3 ad nauseum...
He is the only user directly accessing the schema (and the only user accessing the page via APEX too, although I appreciate this isn't quite the same thing).
I was wondering if, due to the architecture of APEX (the use of session pools etc), the state of a package might be being retained in some manner, thus resulting in this library cache pin wait event? If so, is there anything I can do to mitigate against this occurring?
p.s. the only difference I can see between this particular package and any other package in the schema is that this one interacts with blobs (including making references to the wwv_flow_files view) - with blobs being passed as parameters between procedures (thus potentially creating temporary blobs which may or may not being closed).
Any ideas?
p.p.s. there are also no DBMS_SCHEDULER jobs or anything that might potentially be running the code incidentally...
Edited by: Joel_C on 11-Nov-2011 11:58
We got our DBAs to run a bit of code to identify the blocking session:
select
         decode(lob.kglobtyp, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER',
                      4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
                      7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
                      11, 'PACKAGE BODY', 12, 'TRIGGER',
                      13, 'TYPE', 14, 'TYPE BODY',
                      19, 'TABLE PARTITION', 20, 'INDEX PARTITION', 21, 'LOB',
                      22, 'LIBRARY', 23, 'DIRECTORY', 24, 'QUEUE',
                      28, 'JAVA SOURCE', 29, 'JAVA CLASS', 30, 'JAVA RESOURCE',
                      32, 'INDEXTYPE', 33, 'OPERATOR',
                      34, 'TABLE SUBPARTITION', 35, 'INDEX SUBPARTITION',
                      40, 'LOB PARTITION', 41, 'LOB SUBPARTITION',
                      42, 'MATERIALIZED VIEW',
                      43, 'DIMENSION',
                      44, 'CONTEXT', 46, 'RULE SET', 47, 'RESOURCE PLAN',
                      48, 'CONSUMER GROUP',
                      51, 'SUBSCRIPTION', 52, 'LOCATION',
                      55, 'XML SCHEMA', 56, 'JAVA DATA',
                      57, 'SECURITY PROFILE', 59, 'RULE',
                      62, 'EVALUATION CONTEXT',
                     'UNDEFINED') object_type,
         lob.KGLNAOBJ object_name,
         pn.KGLPNMOD lock_mode_held,
         pn.KGLPNREQ lock_mode_requested,
         ses.sid,
         ses.serial#,
         ses.username
    FROM
       x$kglpn pn,
       v$session ses,
       x$kglob lob,
       v$session_wait vsw
  WHERE
   pn.KGLPNUSE = ses.saddr and
   pn.KGLPNHDL = lob.KGLHDADR
   and lob.kglhdadr = vsw.p1raw
   and vsw.event = 'library cache pin'
order by lock_mode_held descresults as follows (I've changed some object names to protect the ignorant):
OBJECT_TYP OBJECT_NAME                   LOCK_MODE_HELD LOCK_MODE_REQUESTED        SID    SERIAL# USERNAME
PACKAGE    PKG_FOOBAR                             2                   0        356      21694 HTMLDB_PUBLIC_U
                                                                                                  SER
PACKAGE    PKG_FOOBAR                             0                   3        463      22309 FOOHTMLDB_PUBLIC_USER is the apex user incidentally. The session is marked in the v$session table as "inactive", the last statement being
Begin
   Dbms_session.reset_package;
End;Edited by: Joel_C on 11-Nov-2011 14:39

bump
No-one?
The problem seems to have 'resolved itself' over the weekend incidentally (although I don't believe anything truly resolves itself in this manner - something must have changed).

Similar Messages

  • How to resolve Library Cache Pin waits?

    Hai All,
    I grant a select privilage on a table to another user. Then my session hangs. after 5 minutes a message present that is 'ORA-04021: timeout occurred while waiting to lock object....' etc.
    I query the v$session_wait and see a Library Cache pin wait present in my session. I copy the p1raw column from here and put into some x$ tables and v$session then I can identify one session using a application using that table. I kill that session . then my grant privilage query works..
    So what is library cache pin waits.. How to identify in application...How to resolve it? it resolve in database level or application level?
    Please Help..
    Shiju

    Most common cause of library cache pin wait event are
    -- Not use binding variables in the query
    -- Some one keeps modify the schema objects
    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.
    Wait Time: 3 seconds (1 second for PMON)
    Parameter Description
    handle address Address of the object being loaded
    pin address Address of the load lock being used. This is not the same thing as a latch or an enqueue, it is basically a State Object.
    mode Indicates which data pieces of the object that needs to be loaded
    namespace See "namespace"

  • High CPU load with Library Cache Pin wit event.

    Oracle8i Enterprise Edition Release 8.1.6.0.0, 64 bit - Production
    HP-UX B.11.00 U 9000/800 605309363 unlimited-user license
    Currently CPU load is 100% with very less sessions in the database.
    But i am finding Library Cache Pin wait event in top.
    If i query v$latchholder i am not getting any rows..and in v$lacth_children
    SQL> select SID,EVENT,WAIT_TIME,SECONDS_IN_WAIT,STATE from v$session_wait where EVENT='library cache pin';
           SID EVENT                                     WAIT_TIME SECONDS_IN_WAIT STATE
             8 library cache pin                                 0             863 WAITING
            90 library cache pin                                 0            3093 WAITING
            89 library cache pin                                 0            2566 WAITING
            57 library cache pin                                 0           27384 WAITING
            54 library cache pin                                 0           21029 WAITING
            53 library cache pin                                 0            7840 WAITING
            50 library cache pin                                 0            2620 WAITING
            47 library cache pin                                 0            6031 WAITING
            46 library cache pin                                 0            1241 WAITING
            41 library cache pin                                 0           15637 WAITING
           145 library cache pin                                 0             910 WAITING
           133 library cache pin                                 0            5124 WAITING
           111 library cache pin                                 0           15077 WAITING
            98 library cache pin                                 0            6563 WAITING
            94 library cache pin                                 0            2088 WAITING
            93 library cache pin                                 0            4592 WAITING
            92 library cache pin                                 0           14705 WAITING
            91 library cache pin                                 0           14798 WAITING
            36 library cache pin                                 0            1533 WAITING
            33 library cache pin                                 0            1491 WAITING
            28 library cache pin                                 0           13970 WAITING
            25 library cache pin                                 0            7630 WAITING
            11 library cache pin                                 0           12169 WAITING
            12 library cache pin                                 0            2352 WAITING
            14 library cache pin                                 0           19748 WAITING
    SQL> select addr,name from v$latch where name='library cache';
    ADDR             NAME
    C00000006971D460 library cache
    SQL> select latch#,name from v$latch_children where name='library cache';
        LATCH# NAME
           105 library cache
           105 library cache
           105 library cache
           105 library cache
           105 library cachePlease help me out to find actual cause of these latches and fix ?
    -Yasser

    bump
    No-one?
    The problem seems to have 'resolved itself' over the weekend incidentally (although I don't believe anything truly resolves itself in this manner - something must have changed).

  • Library cache lock wait event

    Hi,
    I am experience hanging in my database. I am using 10.2.0.3 on Solaris 5.10.
    I am having automatic processes that drop the schema and recreate the schema and upload the new data. Since the last few days i am facing in hanging while dropping the schema. I checked and found "Library cache lock" event that caused other processes also in the hanged state. I am trying to find out the reason but not able to crack.
    Can some one advice me?
    Thanks

    Hi,
    There exists an concurrency problem with respect to the object - resource utilization.
    - One client can prevent other clients from accessing the same object
    - The client can maintain a dependency for a long time (for example, no other client can change the object)
    check the from v$session_wait (query taken from the http://www.dba-oracle.com/m_library_cache_pin.htm - for your reference)
    select decode(lob.kglobtyp, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER',
    4, 'VIEW', 5, 'SYNONYM', 6, 'SEQUENCE',
    7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
    11, 'PACKAGE BODY', 12, 'TRIGGER',
    13, 'TYPE', 14, 'TYPE BODY',
    19, 'TABLE PARTITION', 20, 'INDEX PARTITION', 21, 'LOB',
    22, 'LIBRARY', 23, 'DIRECTORY', 24, 'QUEUE',
    28, 'JAVA SOURCE', 29, 'JAVA CLASS', 30, 'JAVA RESOURCE',
    32, 'INDEXTYPE', 33, 'OPERATOR',
    34, 'TABLE SUBPARTITION', 35, 'INDEX SUBPARTITION',
    40, 'LOB PARTITION', 41, 'LOB SUBPARTITION',
    42, 'MATERIALIZED VIEW',
    43, 'DIMENSION',
    44, 'CONTEXT', 46, 'RULE SET', 47, 'RESOURCE PLAN',
    48, 'CONSUMER GROUP',
    51, 'SUBSCRIPTION', 52, 'LOCATION',
    55, 'XML SCHEMA', 56, 'JAVA DATA',
    57, 'SECURITY PROFILE', 59, 'RULE',
    62, 'EVALUATION CONTEXT',
    'UNDEFINED') object_type,
    lob.KGLNAOBJ object_name,
    pn.KGLPNMOD lock_mode_held,
    pn.KGLPNREQ lock_mode_requested,
    ses.sid,
    ses.serial#,
    ses.username
    FROM
    x$kglpn pn,
    v$session ses,
    x$kglob lob,
    v$session_wait vsw
    WHERE
    pn.KGLPNUSE = ses.saddr and
    pn.KGLPNHDL = lob.KGLHDADR
    and lob.kglhdadr = vsw.p1raw
    and vsw.event = 'library cache pin'
    order by lock_mode_held desc
    Resolution might - you need to check the time it takes (the script to drop the schema) and it loads - either doing from parallel sessions or in serial order. I doubt it, till the schema get dropped completely it should not be accessible to any other applications - either objects too, that makes the rise to concurrency Issue with respect to library cache waits - the other sessions are trying access the object.
    - Pavan Kumar N
    - ORACLE 9i/10g - OCP
    http://www.oracleinternals.blogspot.com

  • Library cache pin when accessing apex_application_page_regions

    Hi,
    Oracle 11.2.0.3.0, APEX 4.1.1.00.23.
    I am trying to compile a procedure that access apex_application_page_regions to get the region source of a report :
    BEGIN
         -- get report region source
         SELECT region_source
              INTO l_source
              FROM apex_application_page_regions
          WHERE application_id = p_app_id
               AND page_id = p_app_page_id
               AND static_id = p_report;
    END;I can't compile the procedure. After some time I get ORA-04021: timeout occured while waiting to lock object.
    From v$session :
    STATUS     SERVER          PROGRAM          SQL_EXEC_START          BLOCKING_SESSION_STATUS     BLOCKING_INSTANCE     BLOCKING_SESSION     EVENT               P1TEXT          WAIT_CLASS     STATE
    ACTIVE     DEDICATED     plsqldev.exe     07/02/2012 09:12:52     VALID               1               971               library cache pin     handle address     Concurrency     WAITINGI am forced to ask developers to close all APEX instances to kill sessions, to be able to compile the procedure...
    Is there any way to bypass this ?
    Thank you.
    Yann.

    Yann39 wrote:
    Hi,
    Oracle 11.2.0.3.0, APEX 4.1.1.00.23.
    I am trying to compile a procedure that access apex_application_page_regions to get the region source of a report :
    BEGIN
         -- get report region source
         SELECT region_source
              INTO l_source
              FROM apex_application_page_regions
          WHERE application_id = p_app_id
               AND page_id = p_app_page_id
               AND static_id = p_report;
    END;I can't compile the procedure. After some time I get ORA-04021: timeout occured while waiting to lock object.
    From v$session :
    STATUS     SERVER          PROGRAM          SQL_EXEC_START          BLOCKING_SESSION_STATUS     BLOCKING_INSTANCE     BLOCKING_SESSION     EVENT               P1TEXT          WAIT_CLASS     STATE
    ACTIVE     DEDICATED     plsqldev.exe     07/02/2012 09:12:52     VALID               1               971               library cache pin     handle address     Concurrency     WAITINGI am forced to ask developers to close all APEX instances to kill sessions, to be able to compile the procedure...
    Is there any way to bypass this ?
    Thank you.
    Yann.I previously had a problem similar to this. (Un)fortunately, the issue appeared to solve itself...
    Library Cache Pin Wait Event (within the context of APEX)

  • What is the difference between the library cache pin and the library ...?

    What is the difference between the library cache pin and the library cache lock ?
    What is the relation between them?

    Jonathan Lewis has a nice summary of these two items:
    {message:id=2079008}

  • 先library cache pin还是先library cache lock??

    Question from Oracler:
    session1 给test 建主键
    session2 select test 出现library cache lock
    session3 select test 出现library cache pin
    不是说先获得library cache lock再library cache pin吗
    session1以exclusive模式获得 library cache lock
    session2 以shared模式请求 library cache lock ,session1未释放,所以session2 wait
    那session3 什么解释呢????

    as maclean answer:
    SQL> select * from V$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    session A  SQL> alter table maclean add a10 char(2000) default 'maclean';
    session B:  select 1 from maclean where rownum=1;      ==> hang here !
    session C:  select 1 from maclean where rownum=1;   ==> SAME SQL, hang here !
    SQL> select event from v$session where event like 'library%';
    EVENT
    library cache lock
    library cache pin
    session 4:
    SQL> oradebug setmypid;
    Statement processed.
    SQL> oradebug dump systemstate 266;
    Statement processed.
    SQL> oradebug tracefile_name;
    /s01/admin/G10R21/udump/g10r21_ora_6208.trc
        SO: 0x84f5b4a8, type: 4, owner: 0x84e5d4f8, flag: INIT/-/-/0x00
        (session) sid: 142 trans: (nil), creator: 0x84e5d4f8, flag: (41) USR/- BSY/-/-/-/-/-
                  DID: 0001-0010-00000027, short-term DID: 0000-0000-00000000
                  txn branch: (nil)
                  oct: 3, prv: 0, sql: 0x7bf10088, psql: 0x7bf582f0, user: 0/SYS
        O/S info: user: oracle, term: pts/1, ospid: 6159, machine: vrh8.oracle.com
                  program: [email protected] (TNS V1-V3)
        application name: [email protected] (TNS V1-V3), hash value=0
        waiting for 'library cache lock' blocking sess=0x(nil) seq=23 wait_time=0 seconds since wait started=17
                    handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
        Dumping Session Wait History
         for 'library cache lock' count=1 wait_time=2149666
                    handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
         for 'library cache lock' count=1 wait_time=2930643
                    handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
         for 'library cache lock' count=1 wait_time=2930300
                    handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
         for 'library cache lock' count=1 wait_time=2930715
                    handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
         for 'library cache lock' count=1 wait_time=2930545
                    handle address=7c3a5560, lock address=8003b350, 100*mode+namespace=c9
         for 'library cache lock' count=1 wait_time=2929985
    session 142 is  B  waiting for library cache lock
    the lock handle address is 7c3a5560
            SO: 0x8003b350, type: 53, owner: 0x84f98ba0, flag: INIT/-/-/0x00
            LIBRARY OBJECT LOCK: lock=8003b350 handle=7c3a5560 request=S
            call pin=(nil) session pin=(nil) hpc=0005 hlc=0000
            htl=0x8003b3d0[0x7d034330,0x7d034330] htb=0x7d034330 ssga=0x7e9f2168
            user=84f5b4a8 session=84f5b4a8 count=0 flags=RES/[0010] savepoint=0x1f9
            LIBRARY OBJECT HANDLE: handle=7c3a5560 mutex=0x7c3a5690(0)
            name=SYS.MACLEAN
            hash=458787ae49fd6f284ccb04a892b38231 timestamp=02-09-2012 21:32:36
            namespace=TABL flags=KGHP/TIM/SML/[02000000]
            kkkk-dddd-llll=0000-0701-0701 lock=X pin=X latch#=3 hpc=0006 hlc=0004
            lwt=0x7c3a5608[0x8003b380,0x8003b380] ltm=0x7c3a5618[0x7c3a5618,0x7c3a5618]
            pwt=0x7c3a55d0[0x7c3a55d0,0x7c3a55d0] ptm=0x7c3a55e0[0x7c3a55e0,0x7c3a55e0]
            ref=0x7c3a5638[0x7c3a5638,0x7c3a5638] lnd=0x7c3a5650[0x7bf75a18,0x7bf90650]
              LIBRARY OBJECT: object=7c1dec60
              type=TABL flags=EXS/LOC/UPD[0905] pflags=[0000] status=VALD load=0
              DATA BLOCKS:
              data#     heap  pointer    status pins change whr
                  0 7c3a54a0 7c1ded78 I/P/A/-/-    0 NONE   00
                  8 7c1de7f0 7e33ed48 I/P/A/-/-    1 UPDATE 00
                  9 7c1de8c0 7bf109e8 I/P/A/-/-    1 NONE   00
                 10 7c1de948 7bf10600 I/P/A/-/-    1 NONE   00
    关于session B的 library cache lock , 其原因是 add column 的session A 以 X mode lock SYS.MACLEAN, X mode pin  SYS.MACLEAN 且不释放, 所以session B的 library cache lock不用多解释
    session C:
        SO: 0x84f5dd18, type: 4, owner: 0x84e5dce0, flag: INIT/-/-/0x00
        (session) sid: 144 trans: (nil), creator: 0x84e5dce0, flag: (41) USR/- BSY/-/-/-/-/-
                  DID: 0001-0011-0000000A, short-term DID: 0000-0000-00000000
                  txn branch: (nil)
                  oct: 3, prv: 0, sql: 0x7bf10088, psql: 0x7bf582f0, user: 0/SYS
        O/S info: user: oracle, term: pts/2, ospid: 6183, machine: vrh8.oracle.com
                  program: [email protected] (TNS V1-V3)
        application name: [email protected] (TNS V1-V3), hash value=0
        waiting for 'library cache pin' blocking sess=0x(nil) seq=19 wait_time=0 seconds since wait started=17
                    handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
        Dumping Session Wait History
         for 'library cache pin' count=1 wait_time=2568684
                    handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
         for 'library cache pin' count=1 wait_time=2930677
                    handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
         for 'library cache pin' count=1 wait_time=2929805
                    handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
         for 'library cache pin' count=1 wait_time=2931420
                    handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
         for 'library cache pin' count=1 wait_time=2930258
                    handle address=7bf46e40, pin address=7f03f890, 100*mode+namespace=c8
    session 144 is session C , waiting for library cache pin
    handle address 7bf46e40=>  指向 一个 child cursor namespace=CRSR, 而这个child cursor已经被 session B pin住了:
          SO: 0x7f03f890, type: 54, owner: 0x84f5dd18, flag: INIT/-/-/0x00
          LIBRARY OBJECT PIN: pin=7f03f890 handle=7bf46e40 request=S lock=0
          user=84f5dd18 session=84f5dd18 count=0 mask=0000 savepoint=0x3f flags=[00]
          SO: 0x7ec4cc80, type: 53, owner: 0x84f5dd18, flag: INIT/-/-/0x00
          LIBRARY OBJECT LOCK: lock=7ec4cc80 handle=7bf46e40 mode=N
          call pin=(nil) session pin=(nil) hpc=0000 hlc=0000
          htl=0x7ec4cd00[0x7e449348,0x80c35108] htb=0x80c35108 ssga=0x80c34ff0
          user=84f5dd18 session=84f5dd18 count=1 flags=[0000] savepoint=0x0
          LIBRARY OBJECT HANDLE: handle=7bf46e40 mutex=0x7bf46f70(0)
          namespace=CRSR flags=RON/KGHP/PN0/[10010000]
          kkkk-dddd-llll=0000-0001-0000 lock=N pin=X latch#=3 hpc=0004 hlc=0004
          lwt=0x7bf46ee8[0x7bf46ee8,0x7bf46ee8] ltm=0x7bf46ef8[0x7bf46ef8,0x7bf46ef8]
          pwt=0x7bf46eb0[0x7f03f8c0,0x7f03f8c0] ptm=0x7bf46ec0[0x7bf46ec0,0x7bf46ec0]
          ref=0x7bf46f18[0x7bf7bfe0,0x7bf7bfe0] lnd=0x7bf46f30[0x7bf46f30,0x7bf46f30]
            LIBRARY OBJECT: object=7bf29018
            type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
            READ ONLY DEPENDENCIES: count=1 size=16
            DATA BLOCKS:
            data#     heap  pointer    status pins change whr
                0 7bf20060 7bf28ba8 I/P/A/-/-    0 NONE   00
                6 7bf77a20 7bf776f8 I/P/A/-/-    1 NONE   00
    我们可以找到 上面这个child cursor 的 parent cursor :
          SO: 0x7d03b620, type: 53, owner: 0x84f5b4a8, flag: INIT/-/-/0x00
          LIBRARY OBJECT LOCK: lock=7d03b620 handle=7bf10088 mode=N
          call pin=(nil) session pin=(nil) hpc=0000 hlc=0000
          htl=0x7d03b6a0[0x7d034030,0x7c03c9f8] htb=0x7d034030 ssga=0x7e9f2168
          user=84f5b4a8 session=84f5b4a8 count=1 flags=[0000] savepoint=0x1f7
          LIBRARY OBJECT HANDLE: handle=7bf10088 mutex=0x7bf101b8(0)
          name=select 1 from maclean where rownum=1
          hash=324793c639b13d0954bd5421eaed6701 timestamp=03-08-2012 02:29:24
          namespace=CRSR flags=RON/KGHP/TIM/KEP/PN0/SML/DBN/[12010044]
          kkkk-dddd-llll=0001-0001-0001 lock=N pin=0 latch#=3 hpc=0004 hlc=0004
          lwt=0x7bf10130[0x7bf10130,0x7bf10130] ltm=0x7bf10140[0x7bf10140,0x7bf10140]
          pwt=0x7bf100f8[0x7bf100f8,0x7bf100f8] ptm=0x7bf10108[0x7bf10108,0x7bf10108]
          ref=0x7bf10160[0x7bf10160,0x7bf10160] lnd=0x7bf10178[0x82f4f2f8,0x7bf4d608]
            LIBRARY OBJECT: object=7bf7c8a8
            type=CRSR flags=EXS[0001] pflags=[0000] status=VALD load=0
            CHILDREN: size=16
            child#    table reference   handle
                 0 7bf7c370  7bf7bfe0 7bf46e40                           => 只有一个child  handle 7bf46e40                          
            DATA BLOCKS:
            data#     heap  pointer    status pins change whr
                0 7bf2a428 7bf7c9c0 I/P/A/-/-    0 NONE   00即在session B parse SQL "select 1 from maclean where rownum=1" 的时候, 会生成一个child cursor 并 X mode pin住这个child cursor , 而session C 同时发起 一样的SQL语句 "select 1 from maclean where rownum=1" 时 需要 share 这个child cursor , 即以 S mode pin 这个child cursor , 但是session B 还没有完成 optimize 没有生成完整的child cursor , 需要等待 session A 释放 library cache lock才能 完成, 所以 session C 要等 session B build child cursor , 此时session C等" library cache pin" ;
    如果 session C 执行的是不一样的SQL,那么 session C 不share 同一个child cursor , session C 会wait for library cache lock.
    since 10.2.0.3 "_kks_use_mutex_pin"=TRUE or 11g 开始 使用mutex 保护cursor pin ,所以 session C 若执行 与session B 一样的SQL,那么 wiat for cursor pin S on X
    SQL> select * from V$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    session A:
    SQL> alter table test add t11 char(2000) default 'maclean';
    session B:
    SQL> select * from test where rownum=1;
    session C:
    SQL> select * from test where rownum=1;
    SQL> select event from v$session where wait_class='Concurrency';
    EVENT
    cursor: pin S wait on X
    library cache lock
    SQL> oradebug setmypid;
    Statement processed.
    SQL> oradebug dump systemstate 266;
    Statement processed.
    session C:
    SO: 0x9e2256b8, type: 4, owner: 0x9e59a1c0, flag: INIT/-/-/0x00 if: 0x3 c: 0x3
    proc=0x9e59a1c0, name=session, file=ksu.h LINE:12624, pg=0
    (session) sid: 179 ser: 41307 trans: (nil), creator: 0x9e59a1c0
    flags: (0x41) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
    flags2: (0x40009) -/-/INC
    DID: , short-term DID:
    txn branch: (nil)
    oct: 3, prv: 0, sql: 0x956e18b8, psql: 0x956e18b8, user: 0/SYS
    ksuxds FALSE at location: 0
    service name: SYS$USERS
    client details:
    O/S info: user: oracle, term: pts/3, ospid: 26823
    machine: vrh1.oracle.com program: [email protected] (TNS V1-V3)
    application name: [email protected] (TNS V1-V3), hash value=1481565533
    Current Wait Stack:
    0: waiting for 'cursor: pin S wait on X'
    idn=0xe76d0d8c, value=0xca00000000, where=0x500000000
    wait_id=17 seq_num=18 snap_id=1
    wait times: snap=12.671273 sec, exc=12.671273 sec, total=12.671273 sec
    wait times: max=infinite, heur=12.671273 sec
    wait counts: calls=1148 os=1148
    in_wait=1 iflags=0x15b2
    There is at least one session blocking this session.
    Dumping 1 direct blocker(s):
    inst: 1, sid: 202, ser: 15511
    Dumping final blocker:
    inst: 1, sid: 9, ser: 1
    Wait State:
    fixed_waits=0 flags=0x22 boundary=(nil)/-1
    idn=0xe76d0d8c=> 这个是mutex的标示
    KGX Atomic Operation Log 0x94aa8ca8
    Mutex 0x8a328978(202, 0) idn e76d0d8c oper GET_SHRD
    Cursor Pin uid 179 efd 0 whr 5 slp 1148
    opr=2 pso=0x8b5a8c48 flg=0
    pcs=0x8a3288e0 nxt=(nil) flg=35 cld=1 hd=0x93d4bbb8 par=0x8a328048
    ct=1 hsh=0 unp=(nil) unn=0 hvl=8a328ef0 nhv=1 ses=0x9e1e0ea0
    hep=0x8a328978 flg=80 ld=1 ob=0x939a30b0 ptr=0x935e0348 fex=0x935df6f0
    这个mutex的 oper是 GET_SHRD 即 pin S 它指向 0x93d4bbb8 是一个child cursor
    以下是parent cursor:
    SO: 0x957fa9d8, type: 78, owner: 0x9e1e0ea0, flag: INIT/-/-/0x00 if: 0x3 c: 0x3
    proc=0x9e593da0, name=LIBRARY OBJECT LOCK, file=kgl.h LINE:8547, pg=0
    LibraryObjectLock: Address=0x957fa9d8 Handle=0x956e18b8 Mode=N CanBeBrokenCount=1 Incarnation=1 ExecutionCount=0
    User=0x9e1e0ea0 Session=0x9e1e0ea0 ReferenceCount=1 Flags=CNB/[0001] SavepointNum=4f5864b8
    LibraryHandle: Address=0x956e18b8 Hash=e76d0d8c LockMode=N PinMode=0 LoadLockMode=0 Status=VALD
    ObjectName: Name=select * from test where rownum=1
    FullHashValue=7e277fabf95d7c80e8924ed6e76d0d8c Namespace=SQL AREA(00) Type=CURSOR(00) Identifier=3882683788 OwnerIdn=0
    Statistics: InvalidationCount=1 ExecutionCount=2 LoadCount=3 ActiveLocks=2 TotalLockCount=4 TotalPinCount=1
    Counters: BrokenCount=1 RevocablePointer=1 KeepDependency=1 BucketInUse=3 HandleInUse=3 HandleReferenceCount=0
    Concurrency: DependencyMutex=0x956e1968(0, 2, 0, 0) Mutex=0x956e19e8(0, 45, 0, 0)
    Flags=RON/PIN/TIM/PN0/DBN/[10012841]
    WaitersLists:
    Lock=0x956e1948[0x956e1948,0x956e1948]
    Pin=0x956e1928[0x956e1928,0x956e1928]
    LoadLock=0x956e19a0[0x956e19a0,0x956e19a0]
    Timestamp: Current=03-08-2012 02:45:45
    HandleReference: Address=0x956e1a78 Handle=(nil) Flags=[00]
    LibraryObject: Address=0x8a327fa8 HeapMask=0000-0001-0001-0000 Flags=EXS[0000] Flags2=[0000] PublicFlags=[0000]
    ChildTable: size='16'
    Child: id='0' Table=0x8a328e58 Reference=0x8a3288b8 Handle=0x956db988
    Child: id='1' Table=0x8a328e58 Reference=0x8a328b80 Handle=0x93d4bbb8
    NamespaceDump:
    Parent Cursor: sql_id=fj4kfuvmqu3cc parent=0x8a328048 maxchild=2 plk=y ppn=n
    但是很可惜 0x93d4bbb8 这个 child cursor 被 session B pin住了:
    SO: 0x957fa8d8, type: 78, owner: 0x9e1e0ea0, flag: INIT/-/-/0x00 if: 0x3 c: 0x3
    proc=0x9e593da0, name=LIBRARY OBJECT LOCK, file=kgl.h LINE:8547, pg=0
    LibraryObjectLock: Address=0x957fa8d8 Handle=0x93d4bbb8 Mode=N CanBeBrokenCount=1 Incarnation=1 ExecutionCount=0
    ClusterLock=0x8f1945f8 Context=0x7fd379518308 User=0x9e1e0ea0 Session=0x9e1e0ea0 ReferenceCount=1
    Flags=CBK/[0020] SavepointNum=0
    LibraryHandle: Address=0x93d4bbb8 Hash=0 LockMode=N PinMode=X LoadLockMode=0 Status=VALD
    Name: Namespace=SQL AREA(00) Type=CURSOR(00)
    Statistics: InvalidationCount=0 ExecutionCount=0 LoadCount=1 ActiveLocks=2 TotalLockCount=2 TotalPinCount=3
    Counters: BrokenCount=1 RevocablePointer=1 KeepDependency=0 BucketInUse=0 HandleInUse=0 HandleReferenceCount=0
    Concurrency: DependencyMutex=0x93d4bc68(0, 0, 0, 0) Mutex=0x956e19e8(0, 45, 0, 0)
    Flags=RON/PIN/PN0/EXP/CHD/[10012111]
    WaitersLists:
    Lock=0x93d4bc48[0x93d4bc48,0x93d4bc48]
    Pin=0x93d4bc28[0x93d4bc28,0x93d4bc28]
    LoadLock=0x93d4bca0[0x93d4bca0,0x93d4bca0]
    LibraryObject: Address=0x939a30b0 HeapMask=0000-0001-0001-0000 Flags=EXS[0000] Flags2=[0000] PublicFlags=[0000]
    DataBlocks:
    Block: #='0' name=KGLH0^e76d0d8c pins=0 Change=NONE
    Heap=0x93d1a808 Pointer=0x939a3150 Extent=0x939a3030 Flags=I/-/P/A/-/-
    FreedLocation=0 Alloc=1.546875 Size=4.000000 LoadTime=4385736620
    Block: #='6' name=SQLA^e76d0d8c pins=0 Change=NONE
    Heap=0x8a328a20 Pointer=0x935e0348 Extent=0x935df6f0 Flags=I/-/P/A/-/E
    FreedLocation=0 Alloc=0.000000 Size=0.000000 LoadTime=0
    NamespaceDump:
    Child Cursor: Heap0=0x939a3150 Heap6=0x935e0348 Heap0 Load Time=03-08-2012 02:50:16 Heap6 Load
    PinMode=X
    保持这个 X mode pin的是另外一个 mutex , 这个mutex的 oper是 LONG_EXCL
    Time=03-08-2012 02:50:16 ----------------------------------------
    KGX Atomic Operation Log 0x8f1945f8
    Mutex 0x8a328978(202, 0) idn e76d0d8c oper LONG_EXCL
    Cursor Pin uid 202 efd 0 whr 1 slp 0
    opr=3 pso=0x957fa8d8 flg=0
    pcs=0x8a3288e0 nxt=(nil) flg=35 cld=1 hd=0x93d4bbb8 par=0x8a328048
    ct=1 hsh=0 unp=(nil) unn=0 hvl=8a328ef0 nhv=1 ses=0x9e1e0ea0
    hep=0x8a328978 flg=80 ld=1 ob=0x939a30b0 ptr=0x935e0348 fex=0x935df6f0

  • I have an "Untitled" test service that no longer exists in Library/Services/ but still loads in the context menu and finder services menu.  How do I get rid of it?

    I created an "Untitled" test service, then deleted it.  It no longer exists in Library/Services/ but still loads in the context menu and finder services menu.  Reboots do not change the behavior.  How do I get rid of it?

    ... and mysteriously, it's gone again.  Multiple reboots across the day between then and now, plus a few hibernations as I moved about.  It's as if Finder cached the [deleted!] workflow file and continued to operate off of the cache for an indeterminate time....

  • Oracle 10.2.0.4 library cache contention,every event wait 64s! strange

    my database suddently very slow in a few seconds.After a while, all become normal.
    In awr report,I find no special sql.
    I paste two trouble time awr report here.
    If you have any more information for troubleshooting ,I will paste if you require.
    Thanks.
    AWR report1:
    WORKLOAD REPOSITORY report for
    DB Name DB Id Instance Inst Num Release RAC Host
    DB 3594421410 db2 2 10.2.0.4.0 YES db2
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 2342 17-Mar-09 21:30:23 521 1.1
    End Snap: 2344 17-Mar-09 22:30:25 498 1.0
    Elapsed: 60.03 (mins)
    DB Time: 750.95 (mins)
    Cache Sizes
    ~~~~~~~~~~~ Begin End
    Buffer Cache: 3,504M 3,504M Std Block Size: 8K
    Shared Pool Size: 1,200M 1,200M Log Buffer: 14,340K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 18,182.64 2,754.51
    Logical reads: 326.19 49.41
    Block changes: 123.54 18.72
    Physical reads: 21.33 3.23
    Physical writes: 7.29 1.10
    User calls: 178.46 27.03
    Parses: 62.04 9.40
    Hard parses: 0.09 0.01
    Sorts: 2.00 0.30
    Logons: 0.20 0.03
    Executes: 63.12 9.56
    Transactions: 6.60
    % Blocks changed per Read: 37.87 Recursive Call %: 17.93
    Rollback per transaction %: 14.26 Rows per Sort: 44.63
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 99.99 Redo NoWait %: 99.95
    Buffer Hit %: 93.46 In-memory Sort %: 100.00
    Library Hit %: 99.52 Soft Parse %: 99.86
    Execute to Parse %: 1.70 Latch Hit %: 99.97
    Parse CPU to Parse Elapsd %: 0.82 % Non-Parse CPU: 98.60
    Shared Pool Statistics Begin End
    Memory Usage %: 78.60 78.77
    % SQL with executions>1: 99.38 99.27
    % Memory for SQL w/exec>1: 99.00 98.78
    Top 5 Timed Events Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time Wait Class
    latch: library cache 736 47,078 63965 104.5 Concurrenc
    CPU time 236 0.5
    rdbms ipc reply 360 219 608 0.5 Other
    log file sync 20,469 137 7 0.3 Commit
    gc cr block 2-way 35,641 102 3 0.2 Cluster
    AWR report 2:
    DB Name DB Id Instance Inst Num Release RAC Host
    db 3594421410 db2 2 10.2.0.4.0 YES yt-db2
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 2364 18-Mar-09 08:30:29 497 1.1
    End Snap: 2365 18-Mar-09 08:42:28 511 1.0
    Elapsed: 11.99 (mins)
    DB Time: 277.14 (mins)
    Cache Sizes
    ~~~~~~~~~~~ Begin End
    Buffer Cache: 3,504M 3,504M Std Block Size: 8K
    Shared Pool Size: 1,200M 1,200M Log Buffer: 14,340K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 23,306.73 2,556.74
    Logical reads: 337.31 37.00
    Block changes: 159.74 17.52
    Physical reads: 0.72 0.08
    Physical writes: 9.74 1.07
    User calls: 274.07 30.06
    Parses: 95.29 10.45
    Hard parses: 0.04 0.00
    Sorts: 2.52 0.28
    Logons: 0.19 0.02
    Executes: 95.71 10.50
    Transactions: 9.12
    % Blocks changed per Read: 47.36 Recursive Call %: 9.14
    Rollback per transaction %: 11.13 Rows per Sort: 32.48
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 98.81 Redo NoWait %: 100.00
    Buffer Hit %: 99.79 In-memory Sort %: 100.00
    Library Hit %: 99.86 Soft Parse %: 99.95
    Execute to Parse %: 0.44 Latch Hit %: 99.94
    Parse CPU to Parse Elapsd %: 40.91 % Non-Parse CPU: 81.90
    Shared Pool Statistics Begin End
    Memory Usage %: 79.91 80.01
    % SQL with executions>1: 99.52 99.52
    % Memory for SQL w/exec>1: 98.83 98.77
    Top 5 Timed Events Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time Wait Class
    latch free 176 4,391 24950 26.4 Other
    gc buffer busy 3,726 3,335 895 20.1 Cluster
    gc cr multi block request 4,165 2,204 529 13.3 Cluster
    gc current grant busy 3,938 1,798 457 10.8 Cluster
    latch: cache buffers chains 124 1,548 12487 9.3 Concurrenc
    ^LRAC Statistics DB/Inst: db/db2 Snaps: 2364-2365
    Begin End
    Number of Instances: 2 2
    Global Cache Load Profile
    ~~~~~~~~~~~~~~~~~~~~~~~~~ Per Second Per Transaction
    Global Cache blocks received: 19.36 2.12
    Global Cache blocks served: 19.39 2.13
    GCS/GES messages received: 63.76 6.99
    GCS/GES messages sent: 63.64 6.98
    DBWR Fusion writes: 2.58 0.28
    Estd Interconnect traffic (KB) 334.84
    Edited by: gaoyafang on 2009-3-18 上午12:46

    my database suddently very slow in a few seconds.After a while, all become normal.
    In awr report,I find no special sql.
    I paste two trouble time awr report here.
    If you have any more information for troubleshooting ,I will paste if you require.
    Thanks.
    AWR report1:
    WORKLOAD REPOSITORY report for
    DB Name DB Id Instance Inst Num Release RAC Host
    DB 3594421410 db2 2 10.2.0.4.0 YES db2
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 2342 17-Mar-09 21:30:23 521 1.1
    End Snap: 2344 17-Mar-09 22:30:25 498 1.0
    Elapsed: 60.03 (mins)
    DB Time: 750.95 (mins)
    Cache Sizes
    ~~~~~~~~~~~ Begin End
    Buffer Cache: 3,504M 3,504M Std Block Size: 8K
    Shared Pool Size: 1,200M 1,200M Log Buffer: 14,340K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 18,182.64 2,754.51
    Logical reads: 326.19 49.41
    Block changes: 123.54 18.72
    Physical reads: 21.33 3.23
    Physical writes: 7.29 1.10
    User calls: 178.46 27.03
    Parses: 62.04 9.40
    Hard parses: 0.09 0.01
    Sorts: 2.00 0.30
    Logons: 0.20 0.03
    Executes: 63.12 9.56
    Transactions: 6.60
    % Blocks changed per Read: 37.87 Recursive Call %: 17.93
    Rollback per transaction %: 14.26 Rows per Sort: 44.63
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 99.99 Redo NoWait %: 99.95
    Buffer Hit %: 93.46 In-memory Sort %: 100.00
    Library Hit %: 99.52 Soft Parse %: 99.86
    Execute to Parse %: 1.70 Latch Hit %: 99.97
    Parse CPU to Parse Elapsd %: 0.82 % Non-Parse CPU: 98.60
    Shared Pool Statistics Begin End
    Memory Usage %: 78.60 78.77
    % SQL with executions>1: 99.38 99.27
    % Memory for SQL w/exec>1: 99.00 98.78
    Top 5 Timed Events Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time Wait Class
    latch: library cache 736 47,078 63965 104.5 Concurrenc
    CPU time 236 0.5
    rdbms ipc reply 360 219 608 0.5 Other
    log file sync 20,469 137 7 0.3 Commit
    gc cr block 2-way 35,641 102 3 0.2 Cluster
    AWR report 2:
    DB Name DB Id Instance Inst Num Release RAC Host
    db 3594421410 db2 2 10.2.0.4.0 YES yt-db2
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 2364 18-Mar-09 08:30:29 497 1.1
    End Snap: 2365 18-Mar-09 08:42:28 511 1.0
    Elapsed: 11.99 (mins)
    DB Time: 277.14 (mins)
    Cache Sizes
    ~~~~~~~~~~~ Begin End
    Buffer Cache: 3,504M 3,504M Std Block Size: 8K
    Shared Pool Size: 1,200M 1,200M Log Buffer: 14,340K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 23,306.73 2,556.74
    Logical reads: 337.31 37.00
    Block changes: 159.74 17.52
    Physical reads: 0.72 0.08
    Physical writes: 9.74 1.07
    User calls: 274.07 30.06
    Parses: 95.29 10.45
    Hard parses: 0.04 0.00
    Sorts: 2.52 0.28
    Logons: 0.19 0.02
    Executes: 95.71 10.50
    Transactions: 9.12
    % Blocks changed per Read: 47.36 Recursive Call %: 9.14
    Rollback per transaction %: 11.13 Rows per Sort: 32.48
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 98.81 Redo NoWait %: 100.00
    Buffer Hit %: 99.79 In-memory Sort %: 100.00
    Library Hit %: 99.86 Soft Parse %: 99.95
    Execute to Parse %: 0.44 Latch Hit %: 99.94
    Parse CPU to Parse Elapsd %: 40.91 % Non-Parse CPU: 81.90
    Shared Pool Statistics Begin End
    Memory Usage %: 79.91 80.01
    % SQL with executions>1: 99.52 99.52
    % Memory for SQL w/exec>1: 98.83 98.77
    Top 5 Timed Events Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time Wait Class
    latch free 176 4,391 24950 26.4 Other
    gc buffer busy 3,726 3,335 895 20.1 Cluster
    gc cr multi block request 4,165 2,204 529 13.3 Cluster
    gc current grant busy 3,938 1,798 457 10.8 Cluster
    latch: cache buffers chains 124 1,548 12487 9.3 Concurrenc
    ^LRAC Statistics DB/Inst: db/db2 Snaps: 2364-2365
    Begin End
    Number of Instances: 2 2
    Global Cache Load Profile
    ~~~~~~~~~~~~~~~~~~~~~~~~~ Per Second Per Transaction
    Global Cache blocks received: 19.36 2.12
    Global Cache blocks served: 19.39 2.13
    GCS/GES messages received: 63.76 6.99
    GCS/GES messages sent: 63.64 6.98
    DBWR Fusion writes: 2.58 0.28
    Estd Interconnect traffic (KB) 334.84
    Edited by: gaoyafang on 2009-3-18 上午12:46

  • Can we create a sub Event within the main Event in iPhoto?

    I would like to reduce the amount of Events I have showing in iPhoto, to one Event for one catogory and then create sub events within this main Event.
    For example.
    Create 'Holidays' for Main Event
    Then various sub Events within 'Holidays' showing destinations for each holiday with the photos.
    Regards
    John

    This is what Larry is referring to:
    OT

  • Close portal window ( popup ) through an button event within the wd-app

    Hello Experts,
    the scenario is as follows:
    i click on a link within the enterprise portal environment and it opens a wd application within a popup( portal window ). This application has a CANCEL button. when a user clicks on this the portal window should close. How can this be achieved ?
    I tried firing the outbound plug of type exit of the wd app main window, but it just blanks out the screen and doesn't close the window it self.
    Regards,
    Shweta

    Hi Shweta,
    as i discussed with you to update the script code
    <html><script> function closeWindow( ){       top.close( );     }                  </script><body><form> The application was logged off successfully. <br><input type="button" value="close window" onclick="closeWindow( );" /></ form></body></html>
    in sicf transaction for your component.
    it will work (close the window).
    dont forget to give me points
    all the best...
    Rgds,
    Mahesh.Gattu

  • How to load the object library at run time from within the script.

    What i am trying to do from my library is that I wanted to load the object library file (.properties) file at run time through the script. I know that open script has a deprecated method "ft.loadObjectLibrary". Is there any other method other than the deprecated one?. Also is there a way that I can unload the library?
    Thanks,
    Sri

    Object.border.fill.color.value = "255,255,255";
    if you want to use rawValue of textfields to insert in there you will have to do
    Object.border.fill.color.value = R.rawValue + "," + G.rawValue + "," + B.rawValue

  • 11g - 11.1.0.7.0 - 64bit PL/SQL library cahce pin issue

    We just upgraded our production a couple of months ago to 11.1.0.7.0 - 64bit and having a lots of fun :) The main issue we started to see is that we tried compiling the package the other day (the package which doesn't have any dependency at all) and it just got hung. We tried again the same thing again later and it just didn't compile and just got hung. Then later DBA called us saying that database had about 100 copies of the PL/SQL block in the memory that are trying to do library pin. At this point of time the database started to reject new connections therefore the application started to fail. Then we looked at the library pin and found 100s of the statement below - basically for the same package that we are trying to compile - we use the HTP package call to present the web page from PL/SQL. Any hint on what might have happened:
    - call that is generating the library cache pin wait events:
    declare
    rc__ number;
    simple_list__ owa_util.vc_arr;
    complex_list__ owa_util.vc_arr;
    begin
    owa.init_cgi_env(:n__,:nm__,:v__);
    htp.HTBUF_LEN := 255;
    null;
    null;
    simple_list__(1) := 'sys.%';
    simple_list__(2) := 'dbms\_%';
    simple_list__(3) := 'utl\_%';
    simple_list__(4) := 'owa\_%';
    simple_list__(5) := 'owa.%';
    simple_list__(6) := 'htp.%';
    simple_list__(7) := 'htf.%';
    simple_list__(8) := 'wpg_docload.%';
    if ((owa_match.match_pattern('cms.era_data_view.show', simple_list__, complex_list__, true))) then
    rc__ := 2;
    else
    null;
    null;
    cms.era_data_view.show(p_page=>:p_page);
    if (wpg_docload.is_file_download) then
    rc__ := 1;
    wpg_docload.get_download_file(:doc_info);
    null;
    null;
    null;
    commit;
    else
    rc__ := 0;
    null;
    null;
    null;
    commit;
    owa.get_page(:data__,:ndata__);
    end if;
    end if;
    :rc__ := rc__;
    end;

    Yes, and the SR# is 7592995.992 .. Please let me know if you have any ideas on this.

  • GATHER_STATS_JOB is causing library cache lock events (blocking)

    Hi,
    I am running an Oracle 10g (2.0.3) RAC configuration on a Solaris 5.10 SPARC-64 box, and a couple of days ago I started to receive blocking alert due a library cache lock even caused by the scheduled GATHER_STATS_JOB. Is there any way to identify which is the table/object that is not being able to be process by the GATHER_STATS_JOB?
    Regards,
    Alberto

    I found this on metalink:
    How to find the blocker
    a. find the p1raw value of the 'library cache pin', e.g.
    select sid, event, p1raw from v$session_wait where event = 'library cache pin';
    SID EVENT P1RAW
    150 library cache pin 288822D4
    select * from dba_kgllock where kgllkreq > 0;
    KGLLKUSE KGLLKHDL KGLLKMOD KGLLKREQ KGLL
    2CB1F978 288822D4 0 3 Pin
    b. find the locked object via x$kglob, e.g.
    select kglnaown, kglnaobj from x$kglob where kglhdadr = '288822D4';
    KGLNAOWN KGLNAOBJ
    SYS DUMMY

  • Sessions hangs with library cache lock

    Der all,
    11.1.0.7 rac on solaris 10
    Our workflow session yesterday hanged on a particular step the session was waiting on a library cache lock (by using query select event,p1,p2 from v$session where sid=<my_sid>;)
    when I checked the blocking session , using the note 122793.1 and http://oracle-study-notes.blogspot.com/2009/05/resolving-library-cache-lock-issue.html and http://oracle-study-notes.blogspot.com/2009/05/find-session-holding-library-cache-lock.html .
    I found that
    SQL> SELECT SID,USERNAME,TERMINAL,PROGRAM FROM V$SESSION
      2   WHERE SADDR in
      3    (SELECT KGLLKSES FROM X$KGLLK LOCK_A
      4     WHERE KGLLKREQ > 0
      5       AND EXISTS (SELECT LOCK_B.KGLLKHDL FROM X$KGLLK LOCK_B
                     WHERE KGLLKSES = '&SADDR_OF_BLKING_SESS'
      6    7                   AND LOCK_A.KGLLKHDL = LOCK_B.KGLLKHDL
      8                   AND KGLLKREQ = 0)
      9    );
    Enter value for saddr_of_blking_sess: 0000000770E494E0
    old   6:                  WHERE KGLLKSES = '&SADDR_OF_BLKING_SESS'
    new   6:                  WHERE KGLLKSES = '0000000770E494E0'
      SID USERNAME        TERMINAL   PROGRAM
      817 SYS             UNKNOWN    oracle@tabsdb07
                                      (J002)
      828 SYS             UNKNOWN    oracle@tabsdb07
                                      (J001)after killing the session, the library cache locks still remained.when I ran trace on the session
    select /*+ all_rows ordered */ A.rowid, :1, :2, :3
    from
    "DBMRPT"."DBM_BIAUTO_SUSP" A , "DBMRPT"."DBM_CDR_FILE_HEAD" B where(
      "A"."CDR_TYPE" is not null and "A"."FILE_ID" is not null) and(
      "B"."CDR_TYPE" (+)= "A"."CDR_TYPE" and "B"."FILE_ID" (+)= "A"."FILE_ID")
      and( "B"."CDR_TYPE" is null or "B"."FILE_ID" is null)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.01          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.01       0.01          0          0          0           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS   (recursive depth: 3)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      row cache lock                                  5        0.00          0.00
      db file sequential read                   295932636        0.07       5066.63
      gc cr grant 2-way                          727813        0.02        233.95
      latch: gc element                              80        0.00          0.00
      latch: gcs resource hash                      870        0.00          0.00
      latch free                                      2        0.00          0.00
      gc remaster                                     9        2.00         12.91
      gcs drm freeze in enter server mode             9        0.54          2.08
      latch: object queue header operation           66        0.00          0.05
      latch: cache buffers chains                    15        0.03          0.20
      resmgr:internal state change                   63        0.10          5.30
      latch: cache buffers lru chain               1260        0.00          0.01
    ********************************************************************************Please guide
    Kai
    all this time sql_id for the session remanined in the sql :
    ALTER TABLE DBMRPT.DBM_BIAUTO_SUSP ENABLE CONSTRAINT DBS1_DCFH_FK ..

    hi..
    Go through [http://orainternals.wordpress.com/2009/06/02/library-cache-lock-and-library-cache-pin-waits/]
    Anand

Maybe you are looking for

  • How to get sum for each currency's in ALV Report

    Hi, A column has amounts with various currency's. May I know how to get sum quantity for each currency in ALV Report? Thanks in advance.

  • Adobe Reader 10.1.3 and error 1321

    I am currently deploying Adobe Reader 10.1.3 MUI and I am seeing several machines fail the installation and report error 1321 (permissions issues). This is an issue because the installer removes the previous version of Reader and fails to install 10.

  • Gradient tool doesn't work with gradients on strokes?!

    Okay, so one of the new flagship features of Illustrator CS6 is gradients on strokes, but you can't use the Gradient Tool with them? I just get a crosshairs pointer with a "no" sign next to it. What's up with that?? I can see why this wouldn't work w

  • Apache plugin support for WLS  6.1 is not working for me.

    Following are the additional configurations I used in httpd.conf after doing LoadModule & AddModule Alias /weblogic "/opt/BEA/wlserver6.1/config/petstore/applications" <Location /weblogic> SetHandler weblogic-handler </Location> <IfModule mod_weblogi

  • Please somebody help me with this

    1.1 modify the application so that: i) Information about any foreign key constraints for the selected table is displayed eg as additional labels in the table editor window, or in a separate dialog window. You can choose how you wish to display this i