Re: Direct SGA access problem because of structs' changing start addresses (e.g., x$ksmsp)
Date: Mon, 13 Jan 2014 22:01:07 +0100
Message-Id: <82CF5D6E-C4AB-4DB0-95FF-9A0D160B7722_at_gmx.de>
Hi Tanel,
thanks a lot, this is extremely helpful (and your advice on how to proceed is, too :-)! Looking forward very much to the next installments of the series!
Ciao
Sigrid
Am 10.01.2014 um 20:43 schrieb Tanel Poder:
> Not all X$ tables read their data directly from the source data structure. For some X$ tables a helper function is first executed, which then extracts th required data from wherever needed (by walking some linked list or even doing disk IO) and then copies the required data to your sessions UGA for presentation via the X$ fixed table interface. So you can't trust the addresses.
>
> I just wrote a blog entry to elaborate this and hopefully have time to write part 2 & 3 some day too:
>
> https://blog.tanelpoder.com/2014/01/10/oracle-x-tables-part-1-where-do-they-get-their-data-from/
>
> If you want to walk the shared pool structures, then I'd start from reading a bunch of shared pool heapdumps and Julian Dyke's shared pool presentation...
>
> --
> Tanel Poder
> Enkitec (The Exadata Experts)
> Services | Training | Troubleshooting | Exadata Book
>
>
>
> On Wed, Jan 8, 2014 at 12:33 AM, keydana_at_gmx.de <keydana_at_gmx.de> wrote:
> Hi,
>
> I'm trying to write some Haskell code for direct SGA access of - preferredly, as of today - x$ksmsp (sql queries against this table being expensive, possibly...), and for that I'm following the approach from Kyle Hailey, as detailed in the Oracle Wait Interface book.
>
> So I need the struct's start address, but unfortunately, when I query x$ksmsp several times in a row - even from the same sqlplus process - I get different results every time... (Actually, this seems to be the case with most fixed tables, apart from those "fixed" fixed ones as x$ksuse...)
>
> It'd be great if anyone had advice, or an idea, what I could do to get this working all the same (and as to what the reason might be?)
> It ought to be possible somehow to do this, as I've tried oradebug direct access with x$ksmsp and it worked (of course, it runs in sqlplus, so I don't know...)
>
> Thanks a lot in advance!
>
> Sigrid--
> http://www.freelists.org/webpage/oracle-l
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Jan 13 2014 - 22:01:07 CET