'SGA용량'에 해당되는 글 1건

  1. 2021.02.03 오라클 PGA, SGA 시간별 사용량 확인
반응형

1. SGA, PGA 설정 Parameter 확인

sqlplus / as sysdba

show parameter sga

show parameter pga

2. 아래의 명령어를 통해 시간대별 PGA, SGA 사용량 확인이 가능합니다.

select sn.INSTANCE_NUMBER, sga.allo sga, pga.allo pga,(sga.allo+pga.allo) tot,trunc(SN.END_INTERVAL_TIME,'mi') time
from
(select snap_id,INSTANCE_NUMBER,round(sum(bytes)/1024/1024/1024,3) allo
from DBA_HIST_SGASTAT
group by snap_id,INSTANCE_NUMBER) sga
,(select snap_id,INSTANCE_NUMBER,round(sum(value)/1024/1024/1024,3) allo
from DBA_HIST_PGASTAT where name = 'total PGA allocated'
group by snap_id,INSTANCE_NUMBER) pga
, dba_hist_snapshot sn
where sn.snap_id=sga.snap_id
and sn.INSTANCE_NUMBER=sga.INSTANCE_NUMBER
and sn.snap_id=pga.snap_id
and sn.INSTANCE_NUMBER=pga.INSTANCE_NUMBER
order by sn.snap_id desc, sn.INSTANCE_NUMBER;

show parameter sga

3. 시간변 SGA와 PGA 사용량 확인 후 사이즈를 키울지, 아니면 재분배할 지 고민하여 조정하면 됩니다.

반응형