Question: What do
I query to see the total amount of RAM used by my instance?
Answer: To see the total RAM (SGA
and PGA), you can run this query:
clear breaks
clear computes
clear columns
prompt *******************************************
prompt Get the instance name
prompt *******************************************
select instance_name from v$instance;
prompt
prompt ***********************************************
prompt Get cpu_count
prompt ***********************************************
col c1 heading 'CPU|Cores' format a20
col c2 heading 'Size' format a20
select
name c1,
value c2
from
v$parameter
where
name like '%cpu_count%';
prompt
prompt ***********************************************
prompt Get SGA size from v$sga
prompt ***********************************************
col c1 heading 'Pool|Name' format a20
col c2 heading 'Size' format 999,999,999
select
name c1,
value c2
from
v$sga;
select
sum(value) c2
from
v$sga;
prompt
prompt ***********************************************
prompt Get RAM size if using manual pools
prompt ***********************************************
col c1 heading 'Pool|Name' format a20
col c2 heading 'Size' format a20
select
name c1,
value c2
from
v$parameter
where
(name like '%pool_size%'
or
name like '%cache_size%')
and
value is not null
and
value <> '0';
prompt
prompt ***********************************************
prompt Get RAM size if using AMM
prompt ***********************************************
col c1 heading 'Pool|Name' format a20
col c2 heading 'Size' format 999,999,999
select
name c1,
to_number(value) c2
from
v$parameter
where
name like '%target'
and
(name like 'memory%'
or
name like 'sga%')
and
value is not null
and
value <> '0';
prompt
prompt ***********************************************
prompt Get PGA high water mark
prompt ***********************************************
col c1 heading 'PGA|Stat' format a40
col c2 heading 'Size' format 999,999,999
select
name c1,
value c2
from
v$pgastat
where
name like ('maximum%');
|
|
|
Oracle Training from Don Burleson
The best on site
"Oracle
training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!

|
|
|

|
|
Burleson is the American Team

Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright © 1996 - 2020
All rights reserved by
Burleson
Oracle ®
is the registered trademark of Oracle Corporation.
|
|