avoid_high_invalidations.ksh #!/bin/ksh
# First, we must set the environment . . . .
ORACLE_SID=$1
export ORACLE_SID
ORACLE_HOME=`cat /etc/oratab|grep ^$ORACLE_SID:|cut -f2 -d':'`
#ORACLE_HOME=`cat /var/opt/oracle/oratab|grep ^$ORACLE_SID:|cut -f2 -d':'`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH # ********************************************************* # # This will reduce the size of the data buffer # immediately preceding a large truncate or data purge # # *********************************************************
$ORACLE_HOME/bin/sqlplus –s /nologin<<!
connect system/manager as sysdba; alter system set db_cache_size=10m; alter system flush buffer_cache; exit
! # ********************************************************* # Now we can invoke the data purge. # ********************************************************* nohuppurge_job.ksh > /tmp/purge.lst 2>&1 & # ********************************************************* # # We can not re-set the data buffer region beck to # its original size: # # *********************************************************
$ORACLE_HOME/bin/sqlplus –s /nologin<<!
connect system/manager as sysdba; alter system set db_cache_size=1500m; exit
! |