I am needing to monitor memory usage on an Oracle database server.
I may be just oversimplifying this but, is there a way to get an idea of how much memory an Oracle database is using on a host? What I am wanting is to trigger a memory alert when Oracle is needing more memory.
So, from an TSQL perspective, can you get a % used or % free as far as memory on the host?
Or.. Can you get a %used or % free of what memory Oracle has had allocated to it?
Looking to capture this all from TSQL and not have to shell out to the OS.
For example I am using this to get info on the SGA.
SELECT inst_id, round(sum(value)/1024/1024/1024) SGAGB FROM gv$sga group by inst_id
Then for the PGA.
SELECT inst_id, round(sum(pga_alloc_mem)/1024/1024/1024) alloc, round(sum(pga_used_mem)/1024/1024/1024) used FROM gV$PROCESS group by inst_id
I am just not sure how to turn that into a simple, yes or no, if memory is an issue.