Re: Direct SGA access problem because of structs' changing start addresses (e.g., x$ksmsp)

From: Marcin Przepiorowski <pioro1_at_gmail.com>
Date: Thu, 16 Jan 2014 20:04:39 +0000
Message-ID: <CAGdek=xnmy75t6fd+NYz9M-Dn7TndraO7h4z+cSP8hJ3rtJE9A_at_mail.gmail.com>



Hi,

I did similar project in the past - way before Oracle 10g and ASH. Based on Kyle's examples I created a HPUX and Linux version for 8i,9i and 10g
and Windows version for 9i.

My approach was really simple - every session is allocating same structure in x$ksuse of if you will find out a starting address of x$ksuse you can run your software without need of extracting addresses from instance every time. As far as I remember I never found out how to find a starting address without query a instance but it was same after restart and was changed only if you changed a memory parameters.

Offset between sessions is different for different versions of Oracle and even a patches so you need to mitigate it anyhow.

If you are interested in I can try to find these sources somewhere but I'm wondering why you are looking into that topic now when ASH is build in into Oracle or you can run S-ASH or other similar tools from SQL.

regards,
Marcin

On Tue, Jan 7, 2014 at 10:33 PM, 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
>
>
>

-- 
Marcin Przepiorowski
http://oracleprof.blogspot.com

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 16 2014 - 21:04:39 CET

Original text of this message