2015. 11. 23. 11:22 오라클
export import shell
내가 사용하는 export import Shell
vi export.sh
### DB EXPORT ###
#########################
# Variable Define
export FPATH=/TEST01
export BDATE=`date +%y%m%d`
export WTIME=workdate
# Old Backup File Remove
#rm -f $FPATH/*log $FPATH/*dmp
# Start Time Check
echo "Start Time" > $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log
echo "" >> $FPATH/$WTIME.log
# Run Export Backup
exp system/yjpower1 file=$FPATH/full.dmp buffer=10240000 RECORDLENGTH=65535 full=y log=$FPATH/imp_$BDATE.log
# End Time Check
echo "End Time" >> $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log
vi import.sh
### DB IMPORT ###
#########################
# Variable Define
export FPATH=/export_backup
export BDATE=`date +%y%m%d`
export WTIME=workdate
# Old Backup File Remove
#rm -f $FPATH/*log $FPATH/*dmp
# Start Time Check
echo "Start Time" > $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log
echo "" >> $FPATH/$WTIME.log
# Run Export Backup
imp system/aosowl file=$FPATH/full_.dmp buffer=10240000 RECORDLENGTH=65535 full=y log=$FPATH/imp_$BDATE.log
# End Time Check
echo "End Time" >> $FPATH/$WTIME.log
echo `date` >> $FPATH/$WTIME.log