Tuesday, April 15, 2008

Cron backup on Solaris

#!/bin/sh

ORACLE_BASE=/opt/app/oracle
export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_HOME

ORACLE_SID=sunrise
export ORACLE_SID

LD_LIBRARY_PATH_64=$ORACLE_HOME/lib:$LD_LIBRARY_PATH_64
export LD_LIBRARY_PATH_64

LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

PATH=$ORACLE_HOME/bin:$PATH
export PATH

NLS_LANG=American_America.AL32UTF8
export NLS_LANG

NLS_DATE_FORMAT='DD-Mon-YYYY HH24:MI:SS'
export NLS_DATE_FORMAT

rman target sys/pwd @/home/oracle/crons/backupinc0.rmn log /home/oracle/crons/backupinc0.log