#!/bin/sh
export LANG="zh.CN.GBK"
echo -n "********************************************"
if [ "$#" -ne "1" ]
then
echo "Error ,you should give the fileName"
else
sqlpath=/home/oracle/update/updatesql/${1}
logpath=/home/oracle/update/updatelog/${1}
sqlplus */* < $sqlpath > $logpath
echo "sqlplus */* < $sqlpath > $logpath"
echo ------------${1} start ----------------
cat $logpath
echo ------------${1} end ----------------
fi
date=`date +%Y%m%d`
mkdir -p /home/oracle/update/updatesql/bak/$date
mv /home/oracle/update/updatesql/${1} /home/oracle/update/updatesql/bak/$date