Article Listing 1 Listing 2 Listing 3 aug2004.tar

Listing 2 Environmental setup, oracle_env: This script is called from the backup scripts and sets up the Oracle environment for cron jobs. It needs to be edited to include your own environments settings

ORACLE_BASE=/home/oracle
ORACLE_HOME=/home/oracle/product/10.1.0/db_1
PATH=$ORACLE_HOME:/bin:/usr/bin:/usr/local/bin:/usr/ccs/bin:/usr/sbin:/etc
PATH=$PATH:/usr/openwin/bin
ORAENV_ASK=NO
ORACLE_SID=ora10g
export ORACLE_HOME
export ORACLE_BASE
export PATH
export ORAENV_ASK
export ORACLE_SID
. $ORACLE_HOME/bin/oraenv
sys=`/bin/uname -s`
if [ "$sys" = "SunOS" ]; then
        case `uname -r` in
                4*) sysname="SUNBSD";;
                5*) sysname="SOLARIS";;
                *)  sysname="?";;
        esac;
else
        sysname=$sys
fi

#
# See which options to use with the ps command
#
case $sysname in
        SUNBSD | ULTRIX )       PS_OPTIONS="-auwx";;
        *)                      PS_OPTIONS="-ef";;
esac
export PS_OPTIONS