Show SGA Statistics (show_sga.sql)
What This Script Does
Section titled “What This Script Does”This script displays detailed SGA memory allocation statistics for all components across all RAC instances. Essential for understanding memory distribution within the SGA and identifying memory consumption patterns.
The Script
Section titled “The Script”set pagesize 999column name format a40column bytes format 999,999,999,999,999
select inst_id ,pool ,name ,bytesfrom gv$sgastatorder by name, inst_id;
Parameters
Section titled “Parameters”The script prompts for:
- None - this script requires no parameters
-- Basic usage@show_sga.sql
Sample Output
Section titled “Sample Output” INST_ID POOL NAME BYTES---------- ------------------------------ ---------------------------------------- ------------------- 1 fixed_sga 3,694,600 2 fixed_sga 3,694,600 1 shared pool ASH buffers 16,777,216 2 shared pool ASH buffers 16,777,216 1 shared pool CCursor 331,776 2 shared pool CCursor 331,776 1 buffer_cache buffer_cache 1,073,741,824 2 buffer_cache buffer_cache 1,073,741,824 1 shared pool dictionary cache 83,886,080 2 shared pool dictionary cache 83,886,080 1 shared pool free memory 134,217,728 2 shared pool free memory 134,217,728 1 large pool free memory 33,554,432 2 large pool free memory 33,554,432 1 java pool free memory 16,777,216 2 java pool free memory 16,777,216 1 shared pool library cache 100,663,296 2 shared pool library cache 100,663,296 1 shared pool sql area 67,108,864 2 shared pool sql area 67,108,864