Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: decode of flag on x$kglob

Re: decode of flag on x$kglob

From: Tanel Põder <tanel.poder.003_at_mail.ee>
Date: Tue, 13 Apr 2004 17:51:11 +0300
Message-ID: <05df01c42166$c3c51370$48f923d5@porgand>


Hi,

A small example:
I executed a SQL statement "select /* tanel */ count(*) from t" over two times, thus the statement remained cached, meaning that a library lock state object is added to my processes state object tree in SGA.

If you dump state objects for your process using the processstate for example, then you get a bunch of flags under library object handle for locked library cache objects:

      SO: 2F764790, type: 51, owner: 2EA3C5AC, flag: INIT/-/-/0x00
      LIBRARY OBJECT LOCK: lock=2f764790 handle=2fdea87c mode=N
      call pin=2F7657E0 session pin=00000000
      htl=2F7647CC[2F776A08,2F776A08] htb=2F776A08
      user=2ea3c5ac session=2ea3c5ac count=1 flags=[00] savepoint=1258
      LIBRARY OBJECT HANDLE: handle=2fdea87c
      name=select /* tanel */ count(*) from t
      hash=796ec347 timestamp=04-13-2004 17:24:19
      namespace=CRSR flags=RON/KGHP/TIM/PN0/SML/[12010000]


See the last row above, it has flags=RON/KGHP/TIM/PN0/SML/ and the bitvector [12010000] seen also in x$kglob.kglhdflg.

So in principle, it's possible to dump a bunch of library cache locks and get the information out from lock handles, which flag does match which bit it the bitmap. And then it's up to imagination to find out which flag does mean what ;)

RON for example means that this library object isn't stored within the parent structure (processes state object) itself, but is somewhere else - in my example it's a shared cursor, PN0 means that this library object's heap 0 is kept pinned as long as the library object itself is locked, in order to avoid aging out the heap 0.

The standard comments apply, this is gray area to me as well, don't necessarily believe what I say ;)

Tanel.

> Hi list,
> Could somebody give some scripts or comments
> on the decode of KGLHDFLG on x$kglob,please.
> Thanks in advance
> Syed
>
>
>
>
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to: oracle-l-request_at_freelists.org
> put 'unsubscribe' in the subject line.
> --
> Archives are at http://www.freelists.org/archives/oracle-l/
> FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
> -----------------------------------------------------------------
>



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Tue Apr 13 2004 - 09:59:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US