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_lib_cache.sql
REM
REM STATS SGA
REM
REM Author:
REM Vitaliy Mogilevskiy
REM VMOGILEV
REM (vit100gain@earthlink.net)
REM
REM Purpose:
REM
REM Reports LIBRARY_CACHE RELOADRATIO and GETHITRATIO.
REM 1. RELOADRATION = shoul be low < 1
REM
REM sum(reloads)
REM reloadratio = ------------ should be < 1
REM sum(pins)
REM
REM 2. GETHITRATIO = should be high (>90%)
REM
REM
REM Usage:
REM s_sga_lib_cache.sql
REM
REM Example:
REM s_sga_lib_cache.sql
REM
REM
REM History:
REM 08-01-1998 VMOGILEV Created
REM
REM
ttitle off
btitle off
set pages 100
set lines 132
clear col
clear breaks
prompt *****************************
prompt RELOADRATIO should be low < 1
prompt
select sum(pins), sum(reloads)
, sum(reloads) / sum(pins) * 100 "Reload Ratio"
from v$librarycache
/
prompt
prompt
prompt *****************************
prompt GETHITRATIO should be high > 90%
prompt
select namespace
, gethitratio
, pinhitratio
, reloads
, invalidations
from v$librarycache
/