Logo

SQL Script

Free Memory in SGA

Tested on Oracle 8.1

Updated : 30-Jul-2002
Version : 2.1

Description

This script list the total memory in the shared_pool and the amount of free memory. (Remember: too much free memory in the shared_pool is wasteful and may be better used elsewhere !)

Parameters

None

SQL Source

col value form 999,999,999,999 heading "Shared Pool Size"
col bytes form 999,999,999,999 heading "Free Bytes"
col percentfree form 999 heading "Percent Free"

spool freesga.lst

select  pool
        , to_number(v$parameter.value) value, v$sgastat.bytes, 
	(v$sgastat.bytes/v$parameter.value)*100 percentfree
from 	v$sgastat, v$parameter
where	v$sgastat.name = 'free memory' and pool='shared pool'
and	v$parameter.name = 'shared_pool_size';

spool off 

Previous Oracle Version Links

Free Memory in SGA

Return to Index of SQL Scripts


Home | Company Profile | Services | Contact Us | SQL scripts and tips | Quiz
Legal

Logo