Database – Oracle 9i Instance Memory Usage

databasememoryoracleprocessunix

My question deals specifically with a way to tell how much memory is being used by an Oracle instance on a UNIX (Solaris) server.

For example (I'm gonna really oversimplify this…), if I see that there's 8GB of RAM in use, is there a "simple" method (either through TOAD or some UNIX tool) to identify what portion of that memory is being used by a particular Oracle instance?

Through contact with an Oracle instructor and Sun support site searches, I was able to find "pmap" command usage to obtain the "anon" memory for Oracle processes, but hopefully someone will have an alternate solution.

I do have the Sun Management Center at my disposal (if that helps), and I'm open to any solution, even bribing the server with burgers and beer. Thanks everyone!

Best Answer

There's two types of memory for an Oracle instance. The SGA is shared memory, and PGA is memory only accessible to the individual processes. If you connect to an instance with appropriate privileges (eg DBA or with SELECT_CATALOG_ROLE) you can

SELECT SUM(VALUE) FROM V$SGA;

SELECT SUM(PGA_ALLOC_MEM) FROM V$PROCESS;

to see the totals for each of those.