Logo

SQL Script

Free Memory in SGA

Tested on Oracle 8.0 Tested on Oracle 7

Updated : 30-June-1999
Version : 1.0

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   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	v$parameter.name = 'shared_pool_size';
spool off 

Return to Index of SQL Scripts


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

Logo