shared_pool_spare_free.sql

jss001發表於2009-02-15
select avg(v.value) shared_pool_size,greatest(avg(s.ksmsslen) - sum(p.ksmchsiz), 0) spare_free,
to_char(100 * greatest(avg(s.ksmsslen) - sum(p.ksmchsiz), 0) / avg(v.value),'99999') || '%' wastage
from sys.x$ksmss s, sys.x$ksmsp p,sys.v$parameter v
where s.inst_id = userenv('Instance') and
p.inst_id = userenv('Instance') and
p.ksmchcom = 'free memory' and
s.ksmssnam = 'free memory' and
v.name = 'shared_pool_size';
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18921899/viewspace-1017393/,如需轉載,請註明出處,否則將追究法律責任。