select machine,count(*) from v$session group by machine;
select machine,status,count(*) from v$session group by machine,status order by status;
select 'SGA' AS NAME,ROUND(sum(value)/1024/1024,2)||'M' AS "SIZE(M)" from v$sga
UNION
select 'PGA' AS NAME,ROUND(value/1024/1024,2)||'M' AS "SIZE(M)" from v$pgastat where name='total PGA allocated'
UNION
select 'TOTAL' AS NAME,((SELECT ROUND(sum(value)/1024/1024,2) from v$sga)+(select ROUND(value/1024/1024,2) from v$pgastat where name='total PGA allocated'))||'M' AS "SIZE(M)" FROM DUAL
UNION
SELECT NAME,TO_CHAR(VALUE) FROM V$PGASTAT WHERE NAME='process count';
Oracle 11g设置内存自动管理:
ALTER SYSTEM SET MEMORY_TARGET = 1024M SCOPE=SPFILE;
ALTER SYSTEM SET memory_max_target = 1500M SCOPE=SPFILE;