Pages

Sunday, 26 May 2013

exp full back up script


oraprod4 oraprfdm /db/cpmfdmp/oracle/scripts/exp

cpmfdmp> cat cpmfdmp_dly_full_dp_exp
#!/bin/ksh
#NLS_LANG="AMERICAN_AMERICA.WE8ISO8859P1"
#export NLS_LANG
#. oraenv >/dev/null << eof
. /home/oraprfdm/cpmfdmp
#eof
echo ' '
echo "**** - CPMPFDMP EXPORT of $ORACLE_SID ****"
echo This will copy the cpmfdmp system to /db/cpmfdmp/export disk drive.
date
echo $ORACLE_SID
LOGOUT=/db/cpmfdmp/export/cpmfdmp_exp_dp_full.log; export LOGOUT
date
rm -f /db/cpmfdmp/export/cpmfdmp_dly_full_dp.dmp;
rm -f /db/cpmfdmp/export/cpmfdmp_exp_dp_full.log;
usersid=`cat /db/cpmfdmp/oracle/admin/cpmfdmp/create/system/pdssystem.sql`
expdp $usersid PARFILE=/db/cpmfdmp/oracle/scripts/exp/ctl/cpmfdmp_dly_full_dp.ctl
RETVAL=$?
if [ $RETVAL -ne 0 ]
     then
        echo ""
        echo "${PNAME}: Export error; Return code = <${RETVAL}>"
        echo ""
        exit 8
fi

check_success=`grep 'successfully completed' $LOGOUT|wc -l`
oracle_num=`expr $check_success`

No comments:

Post a Comment