REM REM DBAToolZ NOTE: REM This script was obtained from DBAToolZ.com REM It's configured to work with SQL Directory (SQLDIR). REM SQLDIR is a utility that allows easy organization and REM execution of SQL*Plus scripts using user-friendly menu. REM Visit DBAToolZ.com for more details and free SQL scripts. REM REM REM File: REM s_sga.sql REM REM SGA REM REM Author: REM Vitaliy Mogilevskiy REM VMOGILEV REM (vit100gain@earthlink.net) REM REM Purpose: REM REM SGA usage REM REM REM Usage: REM s_sga.sql REM REM Example: REM s_sga.sql REM REM REM History: REM 08-01-1998 VMOGILEV Created REM REM select value/1024/1024 shared_pool_size from v$parameter where name = 'shared_pool_size'; select * From v$sgastat; select 'Memory Allocation' " " , round(s.sgasize/1024/1024,2) "Total SGA (Mb)" , round(f.bytes/1024/1024,2) " Free (Mb)" , round(f.bytes*100/s.sgasize,2) " Free (%)" from (select sum(bytes) sgasize from sys.v_$sgastat) s , sys.v_$sgastat f where f.name = 'free memory' / select round(used.bytes /1024/1024 ,2) used_mb , round(free.bytes /1024/1024 ,2) free_mb , round(tot.bytes /1024/1024 ,2) total_mb from (select sum(bytes) bytes from v$sgastat where name != 'free memory') used , (select sum(bytes) bytes from v$sgastat where name = 'free memory') free , (select sum(bytes) bytes from v$sgastat) tot /