Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is it possible to read a SGA's memory architecture ?
That's not as difficult to do, as it is to justify the purpose and to do
it
reliably. If you can share the practical purpose, that would be very
interesting.
You will need a key for the shared segment. Try oradebug ipc.
At least on Solaris, you can try plain shmget/shmat functions to attach
to the SGA. I think Oracle maps the SGA at address 0, although you
will have to find that out. You can read about how to use these
functions
in any UNIX programming book.
You will need to get the address from X$ tables (ADDR columns) and do simple maths to get to the data you want. That will locate a row.
Then you need to know the types of the columns, check v$type_size and offset after addr appropriately.
I never had any practical purpose to do that, but I wrote a program to
get
something from v$session just for the fun of it. That was several years
ago
and I don't have the code.
And, once again, check if you really need to do this. There might be
better
ways of resolving your needs.
yun chul jang wrote:
> Hi !
> I'm trying to read a SGA's memory architecture through any language.
> But, it's a little difficult thing for me.
> If you have some tips, please let me know.
> In advance, thank you.
Received on Thu Oct 24 2002 - 02:22:45 CDT