Reputation: 21
I'm writing a Web Application in Oracle Apex. Is there any table where I can find out the maximum usable memory? It needs to be an SQL Statement.
I've searched on google but I found not the right answer for my problem.
Upvotes: 1
Views: 317
Reputation: 146219
Basically, Oracle memory is arranged into two chunks:
These chunks are subdivided to support different types of database operations. The documentation covers all this in greater detail. Find out more.
For your specific purpose, the maximum size of the SGA and PGA will give you the "maximum usable memory". This query provides that information:
select name, value
from v$parameter
where name in ('sga_max_size', 'pga_aggregate_limit')
For these parameters value
is in bytes. You may wish to sum them together, but the two areas are not fungible so it's probably more useful to know the two allocations.
Note that v$parameter
is not exposed to non-DBA users by default. So you may need to get privileges granted to your user before you can build an Apex screen over it.
Upvotes: 2