Re: decode of flag on x$kglob

  • From: Tanel Põder <tanel.poder.003@xxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 13 Apr 2004 17:51:11 +0300

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.

----- Original Message ----- 
From: "Sultan Syed" <ssyed@xxxxxxx>
To: "oracle freelists.org" <oracle-l@xxxxxxxxxxxxx>
Sent: Tuesday, April 13, 2004 4:28 PM
Subject: decode of flag on x$kglob


> 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@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at //www.freelists.org/archives/oracle-l/
> FAQ is at //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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: