spool size_sga.rslt 

set linesize 80;
set pagesize 1000;
set long 50;
set echo on;

/* ************************************************ */
/*                                                  */
/* Author            : Rick Kupcunas                */
/*                   : rick@kupcunas.com            */
/* Original          : 2000-May-18                  */
/*                                                  */
/* This rather 'crude' script will determine whether*/
/*   or not the sga should be increased. The value  */
/*   should be around 1.00; if it is lower one can  */
/*   increase the SHARED_POOL_SIZE in the init.ora  */
/*   file (make sure enough memory exists) ....     */
/*                                                  */
/* ************************************************ */

select name, decode(name, 
       'Fixed Size'      , '<fixed value>',
       'Variable Size'   , 'shared_pool_size',
       'Database Buffers', 'db_block_buffers*db_blk_size',
       'Redo Buffers'    , 'log_buffer', name)   "init.ora parm",
       value 
from v$sga;

select sum(value) "TOTAL" from v$sga;

select (sum(reloads)/sum(pins)) * 100 "Number of Library Cache Miss %"
  from v$librarycache;

select NAME                                 "PARAMETER",
       to_char(BYTES, '999,999,999,999')    "VALUE"
  from  v$sgastat
  where name = 'free memory';
         
set echo off;
spool off;
set long 80;
commit;










