Friday, December 03, 2010

Dynamic Memory Components


-- version 10g
show sga;
-- sga dynamic components (ASMM, SGA_TARGET)
select component
, current_size/1024/1024 "CURRENT_SIZE"
, min_size/1024/1024 "MIN_SIZE"
, user_specified_size/1024/1024 "USER_SPECIFIED_SIZE"
, last_oper_type "TYPE"
from v$sga_dynamic_components
;
-- sga dynamic free memory (to be allocated by oracle)
select current_size/1024/1024 "Current Size MB"
from v$sga_dynamic_free_memory
;
-- sga resize operations
select component
, oper_type
, oper_mode
, initial_size/1024/1024 "INITIAL"
, TARGET_SIZE/1024/1024 "TARGET"
, FINAL_SIZE/1024/1024 "FINAL"
, status
, TO_CHAR(end_time, 'YYYY-MM-DD HH24:MI:SS') "DATE"
from v$sga_resize_ops
;


-- version 11g
show sga;
-- memory dynamic components (ASMM, MEMORY_TARGET)
select component
, current_size/1024/1024 "CURRENT_SIZE"
, min_size/1024/1024 "MIN_SIZE"
, user_specified_size/1024/1024 "USER_SPECIFIED_SIZE"
, last_oper_type "TYPE"
, TO_CHAR(last_oper_time, 'YYYY-MM-DD HH24:MI:SS') "DATE"
from v$memory_dynamic_components
;
-- memory resize operations
select component
, oper_type
, oper_mode
, initial_size/1024/1024 "INITIAL"
, TARGET_SIZE/1024/1024 "TARGET"
, FINAL_SIZE/1024/1024 "FINAL"
, status
, TO_CHAR(end_time, 'YYYY-MM-DD HH24:MI:SS') "DATE"
from v$memory_resize_ops
;

No comments: